]>
granicus.if.org Git - clang/log
Chris Lattner [Sun, 22 Mar 2009 21:03:39 +0000 (21:03 +0000)]
pull "runtime globals" into the same framework as other functions/global variables.
No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67478
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 22 Mar 2009 20:54:47 +0000 (20:54 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67477
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 22 Mar 2009 20:18:17 +0000 (20:18 +0000)]
Disallow abstract types where appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67476
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 19:35:37 +0000 (19:35 +0000)]
fix a fixme: non-proto struct returning function definitions should be compiled
to something like:
define void @bar(%struct.foo* noalias sret %agg.result) nounwind {
instead of:
define void @bar(%struct.foo* noalias sret %agg.result, ...) nounwind {
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67475
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 19:29:18 +0000 (19:29 +0000)]
add some missing type predicates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67474
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Sun, 22 Mar 2009 17:47:44 +0000 (17:47 +0000)]
fix PR3859: crash with 'cc -V'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67472
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 22 Mar 2009 06:42:39 +0000 (06:42 +0000)]
PTHManager::Create():
- Make the Diagnostic::Level for PTH errors to be specified by the caller
clang (driver):
- Set the PTHManager diagnostic level to "Diagnostic::Error" for -include-pth
(a hard error) and Diagnostic::Warning for -token-cache (we can still
proceed).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67462
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 22 Mar 2009 01:52:17 +0000 (01:52 +0000)]
Keep track of whether a class is abstract or not. This is currently only used for the __is_abstract type trait.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67461
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 00:32:22 +0000 (00:32 +0000)]
don't set the name of a call instruction to "call" in release-asserts
build. This shaves another 3% off.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67460
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 00:24:14 +0000 (00:24 +0000)]
fix CreateTempAlloca to not set a name on the alloca for temporaries
in release-assert builds. For automatic variables, explicitly set
a name with setName that does not make a temporary std::string.
This speeds up -emit-llvm-only -disable-free on PR3810 by 4.6%
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67459
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 00:12:30 +0000 (00:12 +0000)]
set function/global names with setName instead of passing the name into the
ctor function. This avoids creating a temporary std::string for the name,
speeding up the testcase in PR3810 by 3.8%
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67457
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 00:10:22 +0000 (00:10 +0000)]
fix some warnings in release-assert mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67456
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 23:59:11 +0000 (23:59 +0000)]
fix test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67455
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 21 Mar 2009 21:00:35 +0000 (21:00 +0000)]
Fixup codegen for nested block literals so that we generate
copy_helpers and dispose_helpers as necessary for them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67453
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 21 Mar 2009 18:13:52 +0000 (18:13 +0000)]
Fix a thinko in the pre-allocation strategy for structured initializer
lists. The code wasn't accounting for the distinction between the
top-level call to getStructuredSubobjectInit and later calls that
occur deeper in the hierarchy. This problem manifested itself as
over-allocation in cases where we have large arrays of small
structures (<rdar://problem/
6707362 >).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67452
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 21 Mar 2009 18:06:45 +0000 (18:06 +0000)]
Issue error if variables are defined inside an objc class,
category or protocol.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67450
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 21 Mar 2009 17:56:30 +0000 (17:56 +0000)]
Frontend: Handle empty input on stdin.
- PR3854.
I think it makes more sense to change MemoryBuffer::getSTDIN (return 0
should indicate error, not empty), but it is documented to return 0
for empty inputs, and some other code appears to rely on this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67449
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 21 Mar 2009 17:55:43 +0000 (17:55 +0000)]
Frontend: Handle empty input on stdin.
- PR3854.
I think it makes more sense to change MemoryBuffer::getSTDIN (return 0
should indicate error, not empty), but it is documented to return 0
for empty inputs, and some other code appears to rely on this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67448
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 09:44:56 +0000 (09:44 +0000)]
now that all the decl reference and creation stuff is going through two
very simple places, reimplement the deferred decl emission logic to not be O(N^2),
fixing PR3810.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67447
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 09:25:43 +0000 (09:25 +0000)]
fix a crash that could occur when a variable declaration became a
function definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67446
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 09:16:30 +0000 (09:16 +0000)]
simplify and cleanup global variable creation stuff to all go through one
code path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67445
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 08:53:37 +0000 (08:53 +0000)]
simplify management of llvm::Function creation to all go through
GetAddrOfFunction. This is simpler and more efficient.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67444
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 08:38:50 +0000 (08:38 +0000)]
code cleanups, rename EmitForwardFunctionDefinition ->
CreateFunctionPrototypeIR, though my next patch will eliminate
it entirely.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67443
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 08:24:40 +0000 (08:24 +0000)]
fix several problems with asm renaming, by pulling it into the mangling code:
1. it wasn't applying to definitions, only declarations, e.g. int x __asm("foo")
2. multiple definitions were conflicting, they weren't getting merged.
3. the code was duplicated in several places.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67442
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 08:13:05 +0000 (08:13 +0000)]
add some fixmes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67441
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 08:06:59 +0000 (08:06 +0000)]
reduce redundant calls of getMangledName.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67440
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 08:03:33 +0000 (08:03 +0000)]
simplify some more code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67439
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 07:48:31 +0000 (07:48 +0000)]
simplify and comment some code better. Make BindRuntimeGlobals
more optimistic that it will work (optimizing for the common case).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67438
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 07:12:05 +0000 (07:12 +0000)]
random code cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67437
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 06:58:21 +0000 (06:58 +0000)]
remove obviously dead code: you can't bitcast a pointer to "Ty" (a function type).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67436
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 06:53:34 +0000 (06:53 +0000)]
avoid making constant folding logic eliminate obviously dead bitcasts, speeding up PR3810
by ~2%.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67434
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 06:49:19 +0000 (06:49 +0000)]
continue dancing around the obvious algorithm issues in PR3810:
This speeds up getAsIdentifierInfo from being a call to a function
with a big switch to a single testl instruction. This speeds up
the example in PR3810 by 6.2%
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67433
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 06:40:50 +0000 (06:40 +0000)]
add an assertion for unreachable code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67432
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 06:31:09 +0000 (06:31 +0000)]
Add a fast path to CodeGenModule::getMangledName for almost all C functions,
speeding up the testcase in PR3810 by 60%.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67431
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 06:27:31 +0000 (06:27 +0000)]
partially inline getAttrs() to speed up PR3810 (and lots of
other code presumably) by 4.3%
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67430
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 06:19:20 +0000 (06:19 +0000)]
simplify CXXNameMangler::mangle, making it exit earlier for C functions.
This speeds up a testcase in 3810 by ~16%.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67429
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 21 Mar 2009 00:40:53 +0000 (00:40 +0000)]
Driver: Give Compilation::Execute total control over the Driver result
code; and don't return an error code when -### is present, even if
errors occur.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67425
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 21 Mar 2009 00:25:09 +0000 (00:25 +0000)]
Add back warning about a PTH file not containing any identifiers, but don't make
it a hard error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67424
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 21 Mar 2009 00:15:11 +0000 (00:15 +0000)]
Allow PTH files with no identifiers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67423
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 20 Mar 2009 23:58:33 +0000 (23:58 +0000)]
When building the structured initializer list, pre-allocate storage in
its vectors based on the subobject type we're initializing and the
(unstructured) initializer list. This eliminates some malloc thrashing
when parsing initializers (from 117 vector reallocations down to 0
when parsing Cocoa.h). We can't always pre-allocate the right amount
of storage, since designated initializers can cause us to initialize
in non-predictable patterns.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67421
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Mar 2009 23:49:28 +0000 (23:49 +0000)]
ccc/Driver/clang-fe: Accept -fbuiltin, and forward -f[no-]builtin to clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67420
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 20 Mar 2009 23:45:36 +0000 (23:45 +0000)]
Fix include-pth.c test case to (hopefully) more resilient to where and how tests
are executed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67419
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Mar 2009 23:39:23 +0000 (23:39 +0000)]
ccc/Driver: .s defaults to 'assembler-with-cpp' on Darwin.
- <rdar://problem/
6669441 > ccc doesn't handle assembler-with-cpp
semantics correctly (but clang supports it)
- This is sad, because it requires a fairly useless target
hook. C'est la vie.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67418
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 20 Mar 2009 23:38:03 +0000 (23:38 +0000)]
Destroy expressions properly when resizing an initializer list
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67417
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 20 Mar 2009 23:11:49 +0000 (23:11 +0000)]
InitListDesignations hasn't been used (ever). Eliminate it, and
simplify the parsing and action interface for designated
initializers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67415
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 20 Mar 2009 22:48:49 +0000 (22:48 +0000)]
Eliminate post-diagnostic hooks. Instead, implement a Sema-specific
variant of DiagnosticBuilder that emits the template instantiation
backtrace when needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67413
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Mar 2009 22:13:54 +0000 (22:13 +0000)]
ccc: Use -include-pth.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67410
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 20 Mar 2009 21:53:12 +0000 (21:53 +0000)]
Fix codegen for support for super inside block literal expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67406
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 20 Mar 2009 21:35:28 +0000 (21:35 +0000)]
Fix <rdar://problem/
6704086 > by allowing the format string checking in Sema to
allow non-literal format strings that are variables that (a) permanently bind to
a string constant and (b) whose string constants are resolvable within the same
translation unit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67404
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 20 Mar 2009 21:23:42 +0000 (21:23 +0000)]
fix test/Preprocessor/macro_paste_mscomment.c.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67403
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 20 Mar 2009 20:48:19 +0000 (20:48 +0000)]
Fix a crash during meta-data generation of objc2's nonfragile abi.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67402
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 20 Mar 2009 20:46:52 +0000 (20:46 +0000)]
Improve documentation for MemberExpr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67401
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 20 Mar 2009 20:39:57 +0000 (20:39 +0000)]
Link from the C++ status page to the open projects page
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67399
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 20 Mar 2009 20:37:36 +0000 (20:37 +0000)]
Document some small- to mid-size open C++ projects
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67398
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 20 Mar 2009 20:21:37 +0000 (20:21 +0000)]
Some minor tweaks and additional tests for rvalue references
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67397
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 20 Mar 2009 20:16:10 +0000 (20:16 +0000)]
rename the <predefines> buffer to <built-in> to solve PR3849.
Add a #include directive around the command line buffer so that
diagnostics generated from -include directives get diagnostics
like:
In file included from <built-in>:98:
In file included from <command line>:3:
./t.h:2:1: warning: type specifier missing, defaults to 'int'
b;
^
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67396
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 20 Mar 2009 20:10:45 +0000 (20:10 +0000)]
GRExprEngine:
- Conjure symbols at '--' and '++' unary operations
- Add utility method SVal::GetConjuredSymbolVal() and constify some arguments
along the way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67395
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 20 Mar 2009 19:57:37 +0000 (19:57 +0000)]
Remove unneeded radar reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67394
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Mar 2009 19:38:56 +0000 (19:38 +0000)]
Driver: Switch to using -include-pth.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67393
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Mar 2009 19:34:03 +0000 (19:34 +0000)]
Update test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67392
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 20 Mar 2009 19:18:21 +0000 (19:18 +0000)]
More super dot-syntax property implementation
when there is actually a property declaration
used in the dot-syntax.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67391
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 20 Mar 2009 18:35:45 +0000 (18:35 +0000)]
Fix <rdar://problem/
6703892 > by not warning about self-comparisons of enum
constants.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67390
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 20 Mar 2009 18:24:39 +0000 (18:24 +0000)]
Fix ivar's size encoding.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67389
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Mar 2009 18:21:51 +0000 (18:21 +0000)]
Driver: Parse Darwin version out of target triple.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67388
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 20 Mar 2009 17:56:12 +0000 (17:56 +0000)]
Add test case for '-include-pth'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67386
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 20 Mar 2009 17:54:25 +0000 (17:54 +0000)]
PTHManager::Create() now creates a PTHManager even if the PTH file contains no
cached tokens. This is for use with -include-pth.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67385
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 20 Mar 2009 17:34:15 +0000 (17:34 +0000)]
retain/release checker: Tracking autorelease counts for objects. We're still not
completely there with accurately modeling autorelease pools.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67384
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 20 Mar 2009 17:33:33 +0000 (17:33 +0000)]
Allow profiling of "invalid" Symbols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67383
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 20 Mar 2009 17:22:23 +0000 (17:22 +0000)]
Implement ir gen. for setter/getter applied to 'super'
in a property dot-syntax notation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67382
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 20 Mar 2009 16:28:22 +0000 (16:28 +0000)]
add tests for the various .S bugs I fixed on wednesday.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67381
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 20 Mar 2009 16:16:49 +0000 (16:16 +0000)]
rename this test from .S to .c so that it gets run.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67380
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Mar 2009 16:06:39 +0000 (16:06 +0000)]
Driver: Add and use darwin::Assemble tool.
- Based on patch from Pieter de Bie; thanks!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67379
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 20 Mar 2009 16:06:38 +0000 (16:06 +0000)]
refactor some code, fixing a problem discovered by the dragonfly bsd people, where
clang was defining "i386" even when in non-gnu mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67378
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Mar 2009 15:59:01 +0000 (15:59 +0000)]
Driver: Add two option overload for AddAllArgValues.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67377
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 20 Mar 2009 15:55:34 +0000 (15:55 +0000)]
pass langoptions around.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67376
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 20 Mar 2009 15:52:06 +0000 (15:52 +0000)]
pass LangOptions into TargetInfo::getTargetDefines, so that targets
can have language-specific defines.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67375
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 20 Mar 2009 15:44:26 +0000 (15:44 +0000)]
add a new LangOptions::GNUMode bit to distinguish between GNU99 and C99 etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67374
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Mar 2009 06:14:23 +0000 (06:14 +0000)]
Driver: Add Arg::getAsString and use when dumping arguments to
diagnostics.
- This ensures that the whole argument and values are printed,
instead of just the option name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67366
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 20 Mar 2009 05:23:53 +0000 (05:23 +0000)]
strictly evaluate SVN_REVISION so that svnversion is run once instead of 4 times.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67365
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Mar 2009 04:37:21 +0000 (04:37 +0000)]
Driver: Implement -print-search-dirs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67362
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Mar 2009 04:36:45 +0000 (04:36 +0000)]
Driver: Unbreak ToolChain::get{File,Program}Paths (which should return
reference, not copy).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67361
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Mar 2009 00:57:52 +0000 (00:57 +0000)]
Driver: Sketch Darwin tool chains.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67356
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Mar 2009 00:52:38 +0000 (00:52 +0000)]
Driver: Add darwin::Lipo tool.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67355
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 20 Mar 2009 00:40:03 +0000 (00:40 +0000)]
Preserve ordering between -include and -include-pth.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67354
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 20 Mar 2009 00:32:56 +0000 (00:32 +0000)]
Allow flexible array initializers that are not surrounded by
braces. We now build the appropriate fully-structured initializer list
for such things. Per PR3618, verified that we're getting the right
code generation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67353
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 20 Mar 2009 00:26:38 +0000 (00:26 +0000)]
Implement "-include-pth" in low-level driver. This allows a PTH file to be used
similar to a regular file passed to "-include". When -include-pth is used, the
low-level driver queries the PTH file for the name of the original source file
that generated the PTH file and implicitly adds a '#include' for that file in
the Predefines buffer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67352
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 20 Mar 2009 00:24:49 +0000 (00:24 +0000)]
Add accessor Preprocessor::getPTHManager().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67351
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Mar 2009 00:20:03 +0000 (00:20 +0000)]
Driver: Move tool chain implementations into ToolChains.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67350
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Mar 2009 00:11:04 +0000 (00:11 +0000)]
Driver: Temporary hack to allow -ccc-print-bindings to work (for
testing) even with -pipe on.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67348
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Thu, 19 Mar 2009 23:18:26 +0000 (23:18 +0000)]
Bindir and Win32 builds work, so switch to .inc files. Leave the .def files in the tree for a day or so longer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67346
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 19 Mar 2009 22:19:30 +0000 (22:19 +0000)]
Add PTHManager::getOriginalSourceFile(), a method that returns the name of the
original source file (if any) that was used to generate the PTH cache.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67343
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 19 Mar 2009 22:10:38 +0000 (22:10 +0000)]
Store the name of the original file used to generate the PTH file in the PTH
file itself.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67340
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Mar 2009 22:03:42 +0000 (22:03 +0000)]
wording.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67337
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 19 Mar 2009 22:01:50 +0000 (22:01 +0000)]
Variables marked as "extern" can actually have internal linkage if
there is a previous declaration marked "static". This fixes PR3645.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67336
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 19 Mar 2009 19:50:58 +0000 (19:50 +0000)]
Add test cases for PR 3820.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67327
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 19 Mar 2009 19:02:20 +0000 (19:02 +0000)]
Per Daniel's suggestion, remove default case from switch statement to make
uncaught language cases a compile warning instead of a runtime error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67325
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Mar 2009 18:58:22 +0000 (18:58 +0000)]
add link to new page
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67324
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Mar 2009 18:57:33 +0000 (18:57 +0000)]
link to diags page.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67323
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Mar 2009 18:56:04 +0000 (18:56 +0000)]
move most of the diags info out to its own file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67321
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 19 Mar 2009 18:55:06 +0000 (18:55 +0000)]
Allow notes to be printed following a fatal error, then suppress any
diagnostics following those notes.
Make exceeding the template instantiation depth a fatal error.
Thanks to Daniel for pointing out the problem!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67320
91177308 -0d34-0410-b5e6-
96231b3b80d8