Revision tags: llvmorg-3.5.0 |
|
#
0a20f541 |
| 29-Aug-2014 |
Hans Wennborg <hans@hanshq.net> |
Better codegen support for DLL attributes being dropped after the first declaration (PR20792)
For the following code:
__declspec(dllimport) int f(int x); int user(int x) { return f(x); }
Better codegen support for DLL attributes being dropped after the first declaration (PR20792)
For the following code:
__declspec(dllimport) int f(int x); int user(int x) { return f(x); } int f(int x) { return 1; }
Clang will drop the dllimport attribute in the AST, but CodeGen would have already put it on the LLVM::Function, and that would never get updated. (The same thing happens for global variables.)
This makes Clang check dropped DLL attribute case each time the LLVM object is referenced.
This isn't perfect, because we will still get it wrong if the function is never referenced by codegen after the attribute is dropped, but this handles the common cases and makes us not fail in the verifier.
llvm-svn: 216699
show more ...
|
Revision tags: llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3 |
|
#
f2cf38e0 |
| 08-Aug-2014 |
Alex Lorenz <arphaman@gmail.com> |
Add a cc1 "dump-coverage-mapping" for testing coverage mapping.
Differential Revision: http://reviews.llvm.org/D4799
llvm-svn: 215258
|
Revision tags: llvmorg-3.5.0-rc2 |
|
#
c017d361 |
| 05-Aug-2014 |
David Majnemer <david.majnemer@gmail.com> |
MS ABI: Aligned tentative definitions don't have CommonLinkage
int __declspec(align(16)) foo; is a tentative definition but the storage for that variable should not have CommonLinkage.
llvm-svn: 21
MS ABI: Aligned tentative definitions don't have CommonLinkage
int __declspec(align(16)) foo; is a tentative definition but the storage for that variable should not have CommonLinkage.
llvm-svn: 214828
show more ...
|
#
ee02499a |
| 04-Aug-2014 |
Alex Lorenz <arphaman@gmail.com> |
Add coverage mapping generation.
This patch adds the '-fcoverage-mapping' option which allows clang to generate the coverage mapping information that can be used to provide code coverage analysis us
Add coverage mapping generation.
This patch adds the '-fcoverage-mapping' option which allows clang to generate the coverage mapping information that can be used to provide code coverage analysis using the execution counts obtained from the instrumentation based profiling (-fprofile-instr-generate).
llvm-svn: 214752
show more ...
|
#
6d0e97af |
| 02-Aug-2014 |
Richard Smith <richard-llvm@metafoo.co.uk> |
In the case of mangling collisions, make an attempt to note both definitions involved.
llvm-svn: 214606
|
#
570706dd |
| 01-Aug-2014 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Actually fix problem with modules buildbot this time.
llvm-svn: 214579
|
#
4b8de11c |
| 01-Aug-2014 |
Alexey Samsonov <vonosmas@gmail.com> |
[Sanitizer] Introduce SanitizerMetadata class.
It is responsible for generating metadata consumed by sanitizer instrumentation passes in the backend. Move several methods from CodeGenModule to Sanit
[Sanitizer] Introduce SanitizerMetadata class.
It is responsible for generating metadata consumed by sanitizer instrumentation passes in the backend. Move several methods from CodeGenModule to SanitizerMetadata. For now the class is stateless, but soon it won't be the case.
Instead of creating globals providing source-level information to ASan, we will create metadata nodes/strings which will be turned into actual global variables in the backend (if needed).
No functionality change.
llvm-svn: 214564
show more ...
|
#
1ba0a07e |
| 01-Aug-2014 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Re-commit r214547 with tests fixed. Hopefully all the bots will be happy now. Original message:
Fix iterator invalidation issues that are breaking my modules buildbot's bootstrap.
llvm-svn: 214555
|
#
455768e2 |
| 01-Aug-2014 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Revert r214547 due to test breakage.
llvm-svn: 214549
|
#
cf08ff50 |
| 01-Aug-2014 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix iterator invalidation issues that are breaking my modules buildbot's bootstrap.
llvm-svn: 214547
|
#
46bb581a |
| 01-Aug-2014 |
Richard Smith <richard-llvm@metafoo.co.uk> |
[modules] Remove IRGen special case for emitting implicit special members if they're somehow missing a body. Looks like this was left behind when the loop was generalized, and it's not been problemat
[modules] Remove IRGen special case for emitting implicit special members if they're somehow missing a body. Looks like this was left behind when the loop was generalized, and it's not been problematic before because without modules, a used, implicit special member function declaration must be a definition.
This was resulting in us trying to emit a constructor declaration rather than a definition, and producing a constructor missing its member initializers.
llvm-svn: 214473
show more ...
|
#
00db2f13 |
| 29-Jul-2014 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR20473: Don't "deduplicate" string literals with the same value but different lengths! In passing, simplify string literal deduplication by relying on LLVM to deduplicate the underlying constant val
PR20473: Don't "deduplicate" string literals with the same value but different lengths! In passing, simplify string literal deduplication by relying on LLVM to deduplicate the underlying constant values.
llvm-svn: 214222
show more ...
|
Revision tags: llvmorg-3.5.0-rc1 |
|
#
6c124143 |
| 18-Jul-2014 |
Alexey Samsonov <vonosmas@gmail.com> |
Make sure globals created by UBSan are not instrumented by ASan.
Summary: This change adds description of globals created by UBSan instrumentation (UBSan handlers, type descriptors, filenames) to ll
Make sure globals created by UBSan are not instrumented by ASan.
Summary: This change adds description of globals created by UBSan instrumentation (UBSan handlers, type descriptors, filenames) to llvm.asan.globals metadata, effectively "blacklisting" them. This can dramatically decrease the data section in binaries built with UBSan+ASan, as UBSan tends to create a lot of handlers, and ASan instrumentation increases the global size to at least 64 bytes.
Test Plan: clang regression test suite
Reviewers: rsmith
Reviewed By: rsmith
Subscribers: cfe-commits, byoungyoung, kcc
Differential Revision: http://reviews.llvm.org/D4575
llvm-svn: 213392
show more ...
|
#
56fc62bf |
| 17-Jul-2014 |
Hans Wennborg <hans@hanshq.net> |
MS compatibility: always emit dllexported in-class initialized static data members (PR20140)
This makes us emit dllexported in-class initialized static data members (which are treated as definitions
MS compatibility: always emit dllexported in-class initialized static data members (PR20140)
This makes us emit dllexported in-class initialized static data members (which are treated as definitions in MSVC), even when they're not referenced.
It also makes their special linkage reflected in the GVA linkage instead of getting massaged in CodeGen.
Differential Revision: http://reviews.llvm.org/D4563
llvm-svn: 213304
show more ...
|
#
15c96696 |
| 12-Jul-2014 |
Alexey Samsonov <vonosmas@gmail.com> |
[ASan] Collect unmangled names of global variables in Clang to print them in error reports.
Currently ASan instrumentation pass creates a string with global name for each instrumented global (to inc
[ASan] Collect unmangled names of global variables in Clang to print them in error reports.
Currently ASan instrumentation pass creates a string with global name for each instrumented global (to include global names in the error report). Global name is already mangled at this point, and we may not be able to demangle it at runtime (e.g. there is no __cxa_demangle on Android).
Instead, create a string with fully qualified global name in Clang, and pass it to ASan instrumentation pass in llvm.asan.globals metadata. If there is no metadata for some global, ASan will use the original algorithm.
This fixes https://code.google.com/p/address-sanitizer/issues/detail?id=264.
llvm-svn: 212872
show more ...
|
#
b2cc23df |
| 10-Jul-2014 |
Alexey Samsonov <vonosmas@gmail.com> |
Be more specific about return types of some methods.
This would allow to call addCompilerUsedGlobal on some Clang-generated globals.
llvm-svn: 212767
|
#
b7dd329f |
| 09-Jul-2014 |
Alexey Samsonov <vonosmas@gmail.com> |
Decouple llvm::SpecialCaseList text representation and its LLVM IR semantics.
Turn llvm::SpecialCaseList into a simple class that parses text files in a specified format and knows nothing about LLVM
Decouple llvm::SpecialCaseList text representation and its LLVM IR semantics.
Turn llvm::SpecialCaseList into a simple class that parses text files in a specified format and knows nothing about LLVM IR. Move this class into LLVMSupport library. Implement two users of this class: * DFSanABIList in DFSan instrumentation pass. * SanitizerBlacklist in Clang CodeGen library. The latter will be modified to use actual source-level information from frontend (source file names) instead of unstable LLVM IR things (LLVM Module identifier).
Remove dependency edge from ClangCodeGen/ClangDriver to LLVMTransformUtils.
No functionality change.
llvm-svn: 212643
show more ...
|
#
e7a8ccfa |
| 07-Jul-2014 |
Alexey Samsonov <vonosmas@gmail.com> |
[Sanitizer] Reduce the usage of sanitizer blacklist in CodeGenModule
Get rid of cached CodeGenModule::SanOpts, which was used to turn off sanitizer codegen options if current LLVM Module is blacklis
[Sanitizer] Reduce the usage of sanitizer blacklist in CodeGenModule
Get rid of cached CodeGenModule::SanOpts, which was used to turn off sanitizer codegen options if current LLVM Module is blacklisted, and use plain LangOpts.Sanitize instead.
1) Some codegen decisions (turning TBAA or writable strings on/off) shouldn't depend on the contents of blacklist.
2) llvm.asan.globals should *always* be created, even if the module is blacklisted - soon Clang's CodeGen where we read sanitizer blacklist files, so we should properly report which globals are blacklisted to the backend.
llvm-svn: 212499
show more ...
|
#
e2cb8d19 |
| 07-Jul-2014 |
David Majnemer <david.majnemer@gmail.com> |
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 <robert@xmos.com> |
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 <robert@xmos.com> |
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 <vonosmas@gmail.com> |
[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 <mail@justinbogner.com> |
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 <mail@justinbogner.com> |
CodeGen: Remove a stray tab character (NFC)
llvm-svn: 211528
|
#
e3a4fb65 |
| 20-Jun-2014 |
Oliver Stannard <oliver.stannard@arm.com> |
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 ...
|