Driver: Handle /GR- in a compatible way with MSVC
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 1 Jul 2014 22:24:56 +0000 (22:24 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 1 Jul 2014 22:24:56 +0000 (22:24 +0000)
commitf607234fde4ccbdd0899a1ea92703e720dd83a22
tree89c5bf97108475f199b5dc370c950a9cb97fb5dd
parent6433f7c84d68039000785d818b2f139354a26f8c
Driver: Handle /GR- in a compatible way with MSVC

There are slight differences between /GR- and -fno-rtti which made
mapping one to the other inappropriate.

-fno-rtti disables dynamic_cast, typeid, and does not emit RTTI related
information for the v-table.

/GR- does not generate complete object locators and thus will not
reference them in vftables.  However, constructs like dynamic_cast and
typeid are permitted.

This should bring our implementation of RTTI up to semantic parity with
MSVC modulo bugs.

llvm-svn: 212138
12 files changed:
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Driver/CC1Options.td
clang/include/clang/Driver/CLCompatOptions.td
clang/lib/AST/VTableBuilder.cpp
clang/lib/Basic/Targets.cpp
clang/lib/CodeGen/MicrosoftCXXABI.cpp
clang/lib/CodeGen/MicrosoftRTTI.cpp
clang/lib/Driver/Tools.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp [new file with mode: 0644]
clang/test/Driver/cl-fallback.c
clang/test/Driver/cl-options.c