#
7b463d5a |
| 30-Jun-2014 |
Alp Toker <alp@nuanti.com> |
CodeGenAction::ExecuteAction(): check for invalid LLVM source locations
Add sign checks to deal with the fact that IR parser line/column pairs are signed integers and sometimes invalid.
The crash p
CodeGenAction::ExecuteAction(): check for invalid LLVM source locations
Add sign checks to deal with the fact that IR parser line/column pairs are signed integers and sometimes invalid.
The crash path is potentially triggered by corrupt '.bc' files in practice, though I don't have a binary input test case that can be checked-in right now.
(Unfortunately the backend itself crashes on various ill-formed '.bc' inputs so this bandage isn't as helpful as it appears yet.)
llvm-svn: 212007
show more ...
|
#
66cc07b4 |
| 27-Jun-2014 |
David Blaikie <dblaikie@gmail.com> |
Remove 'const' from MemoryBuffers used through the SourceManager
This removes a const_cast added in r211884 that occurred due to an inconsistency in how MemoryBuffers are handled between some parts
Remove 'const' from MemoryBuffers used through the SourceManager
This removes a const_cast added in r211884 that occurred due to an inconsistency in how MemoryBuffers are handled between some parts of clang and LLVM.
MemoryBuffers are immutable and the general convention in the LLVM project is to omit const from immutable types as it's simply redundant/verbose (see llvm::Type, for example). While this change doesn't remove "const" from /every/ MemoryBuffer, it at least makes this chain of ownership/usage consistent.
llvm-svn: 211915
show more ...
|
#
895a23fa |
| 27-Jun-2014 |
Alp Toker <alp@nuanti.com> |
const_cast the memory MemoryBuffer following LLVM r211883
llvm-svn: 211884
|
#
aa0dd5a4 |
| 27-Jun-2014 |
Alp Toker <alp@nuanti.com> |
Add a FIXME for an unfortunate issue in ConvertBackendLocation()
This function is copying the entire file contents into memory repeatedly and allocating new file IDs *each time* a source location is
Add a FIXME for an unfortunate issue in ConvertBackendLocation()
This function is copying the entire file contents into memory repeatedly and allocating new file IDs *each time* a source location is processed.
llvm-svn: 211874
show more ...
|
#
dc2c4759 |
| 27-Jun-2014 |
Alp Toker <alp@nuanti.com> |
CodeGenAction: don't duplicate entire .ll/.bc files into memory
Requires supporting changes from LLVM r211861.
llvm-svn: 211862
|
#
913690c7 |
| 24-Jun-2014 |
Diego Novillo <dnovillo@google.com> |
Add new debug kind LocTrackingOnly.
Summary: This new debug emission kind supports emitting line location information in all instructions, but stops code generation from emitting debug info to the f
Add new debug kind LocTrackingOnly.
Summary: This new debug emission kind supports emitting line location information in all instructions, but stops code generation from emitting debug info to the final output.
This mode is useful when the backend wants to track source locations during code generation, but it does not want to produce debug info. This is currently used by optimization remarks (-Rpass, -Rpass-missed and -Rpass-analysis).
When one of the -Rpass flags is used, the front end will enable location tracking, only if no other debug option is enabled.
To prevent debug information from being generated, a new debug info kind LocTrackingOnly causes DIBuilder::createCompileUnit() to not emit the llvm.dbg.cu annotation. This blocks final code generation from generating debug info in the back end.
Depends on D4234.
Reviewers: echristo, dblaikie
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4235
llvm-svn: 211610
show more ...
|
#
b3046995 |
| 12-Jun-2014 |
Rafael Espindola <rafael.espindola@gmail.com> |
Prefix another use of error_code.
llvm-svn: 210832
|
#
27506271 |
| 05-Jun-2014 |
Alp Toker <alp@nuanti.com> |
Provide fallback locations for backend remarks
Instead of disembodied diagnostics when debug info is disabled it's now possible to identify the associated function's location in order to provide som
Provide fallback locations for backend remarks
Instead of disembodied diagnostics when debug info is disabled it's now possible to identify the associated function's location in order to provide some amount of of context.
We use the definition's body right brace location to differentiate the fallback from diagnostics that genuinely relate to the function declaration itself (a convention also used by gcc).
llvm-svn: 210294
show more ...
|
#
fb8d02b1 |
| 05-Jun-2014 |
Alp Toker <alp@nuanti.com> |
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 ...
|
#
5798b26c |
| 05-Jun-2014 |
Joey Gouly <joey.gouly@gmail.com> |
When an inline-asm diagnostic is reported by the backend, report it with the correct severity.
Previously all inline-asm diagnostics were reported as errors.
llvm-svn: 210286
|
#
ea04672c |
| 03-Jun-2014 |
Alp Toker <alp@nuanti.com> |
Fix leak from r210059
Also revert r210096 which temporarily disabled the test while this was being investigated.
llvm-svn: 210115
|
#
cf2048bb |
| 03-Jun-2014 |
Alp Toker <alp@nuanti.com> |
Fix -emit-codegen-only to not generate binaries
llvm-svn: 210059
|
#
d23ec943 |
| 29-May-2014 |
Diego Novillo <dnovillo@google.com> |
Add flags -Rpass-missed and -Rpass-analysis.
Summary: These two flags are in the same family as -Rpass, but are used in different situations.
-Rpass-missed is used by optimizers to inform the user
Add flags -Rpass-missed and -Rpass-analysis.
Summary: These two flags are in the same family as -Rpass, but are used in different situations.
-Rpass-missed is used by optimizers to inform the user when they tried to apply an optimization but couldn't (or wouldn't).
-Rpass-analysis is used by optimizers to report analysis results back to the user (e.g., why the transformation could not be applied).
Depends on D3682.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3683
llvm-svn: 209839
show more ...
|
#
9c89ff19 |
| 29-May-2014 |
Diego Novillo <dnovillo@google.com> |
Fix spurious remarks when -Weverything is used.
With -Weverything, the backend remarks are enabled. This was causing spurious diagnostics for remarks that we don't yet handle (cf http://reviews.llvm
Fix spurious remarks when -Weverything is used.
With -Weverything, the backend remarks are enabled. This was causing spurious diagnostics for remarks that we don't yet handle (cf http://reviews.llvm.org/D3683).
This will stop being a problem once http://reviews.llvm.org/D3683 is committed.
llvm-svn: 209823
show more ...
|
#
583db197 |
| 28-May-2014 |
Warren Hunt <whunt@google.com> |
Reverting 209503 - Breaks asan blacklists I opened a discussion on cfe-commits. Ideally we've got a few things that need to happen. CompilerRT should probably have blacklists tests. Asan should
Reverting 209503 - Breaks asan blacklists I opened a discussion on cfe-commits. Ideally we've got a few things that need to happen. CompilerRT should probably have blacklists tests. Asan should probably not depend on that specific field.
llvm-svn: 209766
show more ...
|
#
a926d84c |
| 23-May-2014 |
Hans Wennborg <hans@hanshq.net> |
Emit used/dllexport inline method definitions in nested classes (PR19743, PR11170)
The previous code that was supposed to handle this didn't work since parsing of inline method definitions is delaye
Emit used/dllexport inline method definitions in nested classes (PR19743, PR11170)
The previous code that was supposed to handle this didn't work since parsing of inline method definitions is delayed to the end of the outer class definition. Thus, when HandleTagDeclDefinition() got called for the inner class, the inline functions in that class had not been parsed yet.
Richard suggested that the way to do this is by handling inline method definitions through a new ASTConsumer callback.
I really wanted to call ASTContext::DeclMustBeEmitted() instead of checking for attributes, but doing that causes us to compute linkage, and then we fail with "error: unsupported: typedef changes linkage of anonymous type, but linkage was already computed" on tests like this: (from SemaCXX/undefined-internal.cpp) :-/
namespace test7 { typedef struct { void bar(); void foo() { bar(); } } A; }
Differential Revision: http://reviews.llvm.org/D3809
llvm-svn: 209549
show more ...
|
#
57dd5cf4 |
| 23-May-2014 |
Robert Lytton <robert@xmos.com> |
Fix '-main-file-name <name>' so that it is used for the ModuleID.
Summary: Previously, you could not specify the original file name when passing a preprocessed file into the compiler Now you can use
Fix '-main-file-name <name>' so that it is used for the ModuleID.
Summary: Previously, you could not specify the original file name when passing a preprocessed file into the compiler Now you can use 'clang -Xclang -main-file-name -Xclang <original file name> ...' Or 'clang -cc1 -main-file-name <original file name> ...'
llvm-svn: 209503
show more ...
|
#
8a13c418 |
| 21-May-2014 |
Craig Topper <craig.topper@gmail.com> |
[C++11] Use 'nullptr'. CodeGen edition.
llvm-svn: 209272
|
Revision tags: llvmorg-3.4.2, llvmorg-3.4.2-rc1 |
|
#
6ac2cd01 |
| 16-May-2014 |
Alp Toker <alp@nuanti.com> |
Rename SourceManager::createFileIDForMemBuffer()
It makes more sense to just overload createFileID().
Gardening only.
llvm-svn: 209002
|
#
6dc9c481 |
| 08-May-2014 |
Diego Novillo <dnovillo@google.com> |
Fix segmentation fault when mixing -Rpass with #line.
Summary: When using #line directives, FileManager::getFile() will return a nil entry. This triggers an assert in translateFileLineCol().
This p
Fix segmentation fault when mixing -Rpass with #line.
Summary: When using #line directives, FileManager::getFile() will return a nil entry. This triggers an assert in translateFileLineCol().
This patch handles nil FileEntry instances by emitting a note that the location could not be translated back to a SourceLocation. I don't really like this solution, but we are translating presumed locations, so some information has already been lost.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3625
llvm-svn: 208315
show more ...
|
#
25c4e67d |
| 02-May-2014 |
Eric Christopher <echristo@gmail.com> |
Small formatting change.
llvm-svn: 207852
|
Revision tags: llvmorg-3.4.1, llvmorg-3.4.1-rc2 |
|
#
b3442249 |
| 22-Apr-2014 |
Diego Novillo <dnovillo@google.com> |
Use a manipulator to add a value to the current diagnostic flag.
Summary: This addresses the feedback to http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140421/103598.html
Reviewers: r
Use a manipulator to add a value to the current diagnostic flag.
Summary: This addresses the feedback to http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140421/103598.html
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3453
llvm-svn: 206920
show more ...
|
#
9f239977 |
| 21-Apr-2014 |
Diego Novillo <dnovillo@google.com> |
Allow adding a value to a flag in diagnostics.
Summary: This allows callers of Diags.Report() to append a value to the name of the flag associated with the diagnostic. This is useful in cases like t
Allow adding a value to a flag in diagnostics.
Summary: This allows callers of Diags.Report() to append a value to the name of the flag associated with the diagnostic. This is useful in cases like the -Rpass flag, where we want the diagnostic to show the name of the pass that matched the pattern. Instead of showing "... [-Rpass]", this allows us to show "... [-Rpass=passname]".
Reviewers: rsmith
CC: cfe-commits
Differential Revision: http://reviews.llvm.org/D3441
llvm-svn: 206826
show more ...
|
#
829b1700 |
| 16-Apr-2014 |
Diego Novillo <dnovillo@google.com> |
Add support for optimization reports.
Summary: This patch adds a new flag -Rpass=. The flag indicates the name of the optimization pass that should emit remarks stating when it made a transformation
Add support for optimization reports.
Summary: This patch adds a new flag -Rpass=. The flag indicates the name of the optimization pass that should emit remarks stating when it made a transformation to the code.
This implements the design I proposed in:
https://docs.google.com/document/d/1FYUatSjZZO-zmFBxjOiuOzAy9mhHA8hqdvklZv68WuQ/edit?usp=sharing
Other changes: - Add DiagnosticIDs::isRemark(). Use it in printDiagnosticOptions to print "-R" instead of "-W" in the diagnostic message.
- In BackendConsumer::OptimizationRemarkHandler, get a SourceLocation object out of the file name, line and column number. Use that location in the call to Diags.Report().
- When -Rpass is used without debug info a note is emitted alerting the user that they need to use -gline-tables-only -gcolumn-info to get this information.
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3226
llvm-svn: 206401
show more ...
|
Revision tags: llvmorg-3.4.1-rc1 |
|
#
4f12f10d |
| 12-Mar-2014 |
Craig Topper <craig.topper@gmail.com> |
[C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203643
|