| #
e2cb8d19 |
| 07-Jul-2014 |
David Majnemer <[email protected]> |
CodeGen: Refactor RTTI emission
Let's not expose ABI specific minutia inside of CodeGenModule and Type. Instead, let's abstract it through CXXABI.
This gets rid of: CodeGenModule::getCompleteObject
CodeGen: Refactor RTTI emission
Let's not expose ABI specific minutia inside of CodeGenModule and Type. Instead, let's abstract it through CXXABI.
This gets rid of: CodeGenModule::getCompleteObjectLocator, CodeGenModule::EmitFundamentalTypeDescriptor{s,}, CodeGenModule::getMSTypeDescriptor, CodeGenModule::getMSCompleteObjectLocator, CGCXXABI::shouldRTTIBeUnique, CGCXXABI::classifyRTTIUniqueness.
CGRTTI was *almost* entirely centered around providing Itanium-style RTTI information. Instead of providing interfaces that only it consumes, move it to the ItaniumCXXABI implementation file. This allows it to have access to Itanium-specific implementation details without providing useless expansion points for the Microsoft ABI side.
Differential Revision: http://reviews.llvm.org/D4261
llvm-svn: 212435
show more ...
|
| #
57765d53 |
| 03-Jul-2014 |
Robert Lytton <[email protected]> |
Move the calling of emitTargetMD() later.
Summary: Because a global created by GetOrCreateLLVMGlobal() is not finalised until later viz: extern char a[]; char f(){ return a[5];} char a[10];
C
Move the calling of emitTargetMD() later.
Summary: Because a global created by GetOrCreateLLVMGlobal() is not finalised until later viz: extern char a[]; char f(){ return a[5];} char a[10];
Change MangledDeclNames to use a MapVector rather than a DenseMap so that the Metadata is output in order of original declaration, so to make deterministic and improve human readablity.
Differential Revision: http://reviews.llvm.org/D4176
llvm-svn: 212263
show more ...
|
| #
5b88f78f |
| 03-Jul-2014 |
Robert Lytton <[email protected]> |
refactor for-loop as range-loop before making changes.
Differential Revision: http://reviews.llvm.org/D4176
llvm-svn: 212262
|
| #
4f319cca |
| 02-Jul-2014 |
Alexey Samsonov <[email protected]> |
[ASan] Print exact source location of global variables in error reports.
See https://code.google.com/p/address-sanitizer/issues/detail?id=299 for the original feature request.
Introduce llvm.asan.g
[ASan] Print exact source location of global variables in error reports.
See https://code.google.com/p/address-sanitizer/issues/detail?id=299 for the original feature request.
Introduce llvm.asan.globals metadata, which Clang (or any other frontend) may use to report extra information about global variables to ASan instrumentation pass in the backend. This metadata replaces llvm.asan.dynamically_initialized_globals that was used to detect init-order bugs. llvm.asan.globals contains the following data for each global: 1) source location (file/line/column info); 2) whether it is dynamically initialized; 3) whether it is blacklisted (shouldn't be instrumented).
Source location data is then emitted in the binary and can be picked up by ASan runtime in case it needs to print error report involving some global. For example:
0x... is located 4 bytes to the right of global variable 'C::array' defined in '/path/to/file:17:8' (0x...) of size 40
These source locations are printed even if the binary doesn't have any debug info.
This is an ABI-breaking change. ASan initialization is renamed to __asan_init_v4(). Pre-built libraries compiled with older Clang will not work with the fresh runtime.
llvm-svn: 212188
show more ...
|
| #
40b8ba14 |
| 26-Jun-2014 |
Justin Bogner <[email protected]> |
CodeGen: Improve warnings about uninstrumented files when profiling
Improve the warning when building with -fprofile-instr-use and a file appears not to have been profiled at all. This keys on wheth
CodeGen: Improve warnings about uninstrumented files when profiling
Improve the warning when building with -fprofile-instr-use and a file appears not to have been profiled at all. This keys on whether a function is defined in the main file or not to avoid false negatives when one includes a header with functions that have been profiled.
llvm-svn: 211760
show more ...
|
| #
9bb7f151 |
| 23-Jun-2014 |
Justin Bogner <[email protected]> |
CodeGen: Remove a stray tab character (NFC)
llvm-svn: 211528
|
| #
e3a4fb65 |
| 20-Jun-2014 |
Oliver Stannard <[email protected]> |
Add module flags metadata to record the settings for enum and wchar width
Add module flags metadata to record the settings for enum and wchar width, to allow correct ARM build attribute generation
Add module flags metadata to record the settings for enum and wchar width
Add module flags metadata to record the settings for enum and wchar width, to allow correct ARM build attribute generation
llvm-svn: 211354
show more ...
|
| #
c080917e |
| 12-Jun-2014 |
Rafael Espindola <[email protected]> |
Replace llvm::error_code with std::error_code.
llvm-svn: 210780
|
| #
35ab328e |
| 11-Jun-2014 |
David Majnemer <[email protected]> |
CodeGen: Correct linkage of thread_local for OS X
The backing store of thread local variables is internal for OS X and all accesses must go through the thread wrapper.
However, individual TUs may h
CodeGen: Correct linkage of thread_local for OS X
The backing store of thread local variables is internal for OS X and all accesses must go through the thread wrapper.
However, individual TUs may have inlined through the thread wrapper. To fix this, give the thread wrapper functions WeakAnyLinkage. This prevents them from getting inlined into call-sites.
This fixes PR19989.
llvm-svn: 210632
show more ...
|
| #
4b56692e |
| 09-Jun-2014 |
Craig Topper <[email protected]> |
[C++11] Use 'nullptr'.
llvm-svn: 210448
|
| #
fb8d02b1 |
| 05-Jun-2014 |
Alp Toker <[email protected]> |
Implement -Wframe-larger-than backend diagnostic
Add driver and frontend support for the GCC -Wframe-larger-than=bytes warning. This is the first GCC-compatible backend diagnostic built around LLVM'
Implement -Wframe-larger-than backend diagnostic
Add driver and frontend support for the GCC -Wframe-larger-than=bytes warning. This is the first GCC-compatible backend diagnostic built around LLVM's reporting feature.
This commit adds infrastructure to perform reverse lookup from mangled names emitted after LLVM IR generation. We use that to resolve precise locations and originating AST functions, lambdas or block declarations to produce seamless codegen-guided diagnostics.
An associated change, StringMap now maintains unique mangled name strings instead of allocating copies. This is a net memory saving in C++ and a small hit for C where we no longer reuse IdentifierInfo storage, pending further optimisation.
llvm-svn: 210293
show more ...
|
| #
adc9037b |
| 04-Jun-2014 |
Alexey Samsonov <[email protected]> |
Remove the overload of GetAddrOfConstantString method
llvm-svn: 210214
|
| #
175e52f5 |
| 04-Jun-2014 |
Alexey Samsonov <[email protected]> |
Refactor and generalize GetAddrOfConstantString and GetAddrOfConstantStringFromLiteral.
Share mode code between these functions and re-structure them in a way which shows how similar they actually a
Refactor and generalize GetAddrOfConstantString and GetAddrOfConstantStringFromLiteral.
Share mode code between these functions and re-structure them in a way which shows how similar they actually are. The latter function works well with literals of multi-byte chars and does a GlobalVariable name mangling (if global strings are non-writable).
No functionality change.
llvm-svn: 210212
show more ...
|
| #
e11f40a9 |
| 04-Jun-2014 |
Rafael Espindola <[email protected]> |
This cast is not necessary any more (llvm api change).
llvm-svn: 210206
|
| #
27c60b51 |
| 03-Jun-2014 |
Rafael Espindola <[email protected]> |
Update for llvm API change.
Aliases in llvm now hold an arbitrary expression.
llvm-svn: 210063
|
| #
0e64e0d4 |
| 03-Jun-2014 |
Alp Toker <[email protected]> |
Eliminate redundant MangleBuffer class
The only remaining user didn't actually use the non-dynamic storage facility this class provides.
The std::string is transitional and likely to be StringRefiz
Eliminate redundant MangleBuffer class
The only remaining user didn't actually use the non-dynamic storage facility this class provides.
The std::string is transitional and likely to be StringRefized shortly.
llvm-svn: 210058
show more ...
|
| #
b4662c3e |
| 29-May-2014 |
Nico Rieck <[email protected]> |
MS ABI: Emit static data members with proper linkage
llvm-svn: 209826
|
| #
c054d981 |
| 29-May-2014 |
Alexey Samsonov <[email protected]> |
[ASan] Hoist blacklisting globals from init-order checking to Clang.
Clang knows about the sanitizer blacklist and it makes no sense to add global to the list of llvm.asan.dynamically_initialized_gl
[ASan] Hoist blacklisting globals from init-order checking to Clang.
Clang knows about the sanitizer blacklist and it makes no sense to add global to the list of llvm.asan.dynamically_initialized_globals if it will be blacklisted in the instrumentation pass anyway. Instead, we should do as much blacklisting as possible (if not all) in the frontend.
llvm-svn: 209789
show more ...
|
| #
275efb9e |
| 28-May-2014 |
Hans Wennborg <[email protected]> |
Don't dllimport/export destructor variants implemented by thunks.
MSVC doesn't export these functions, so trying to import them doesnt' work. Also, don't let any dll attributes on the CXXDestructorD
Don't dllimport/export destructor variants implemented by thunks.
MSVC doesn't export these functions, so trying to import them doesnt' work. Also, don't let any dll attributes on the CXXDestructorDecl influence the thunk's linkage -- they should always be linkonce_odr.
This takes care of the FIXME's for this in Nico's tests.
Differential Revision: http://reviews.llvm.org/D3930
llvm-svn: 209706
show more ...
|
| #
563f0e85 |
| 23-May-2014 |
Reid Kleckner <[email protected]> |
Use comdats to avoid double initialization of weak data
Initializers of global data that can appear multiple TUs (static data members of class templates or __declspec(selectany) data) are now in a c
Use comdats to avoid double initialization of weak data
Initializers of global data that can appear multiple TUs (static data members of class templates or __declspec(selectany) data) are now in a comdat group keyed on the global variable being initialized. On non-Windows platforms, this is a code size and startup time optimization. On Windows, this is necessary for ABI compatibility with MSVC.
Fixes PR16959.
Reviewers: rsmith
Differential Revision: http://reviews.llvm.org/D3811
llvm-svn: 209555
show more ...
|
| #
b73c973d |
| 22-May-2014 |
Rafael Espindola <[email protected]> |
Don't set unnamed_addr in CreateRuntimeVariable.
This was fairly broken. For example,
@__dso_handle would or would not get an unnamed_addr depending on how many global destructors were used in a tr
Don't set unnamed_addr in CreateRuntimeVariable.
This was fairly broken. For example,
@__dso_handle would or would not get an unnamed_addr depending on how many global destructors were used in a translation unit.
The consensus was that not every runtime variable is unnamed_addr and that __dso_handle handle should not be, so just don't add unnamed_addr in CreateRuntimeVariable.
llvm-svn: 209484
show more ...
|
| #
8a13c418 |
| 21-May-2014 |
Craig Topper <[email protected]> |
[C++11] Use 'nullptr'. CodeGen edition.
llvm-svn: 209272
|
| #
2dbdd20d |
| 19-May-2014 |
Adrian Prantl <[email protected]> |
Demote the "Debug Info Version" module flag to llvm::Module::Warning behavior on mismatch. The AutoUpgrader will drop incompatible debug info any way and also emit a warning diagnostic for it.
rdar:
Demote the "Debug Info Version" module flag to llvm::Module::Warning behavior on mismatch. The AutoUpgrader will drop incompatible debug info any way and also emit a warning diagnostic for it.
rdar://problem/16926122
llvm-svn: 209182
show more ...
|
| #
234405bd |
| 17-May-2014 |
Rafael Espindola <[email protected]> |
Update for llvm api change.
llvm-svn: 209077
|
| #
6172277e |
| 17-May-2014 |
Rafael Espindola <[email protected]> |
Update for llvm api change.
llvm-svn: 209074
|