]>
granicus.if.org Git - clang/log
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
Chris Lattner [Thu, 19 Mar 2009 18:52:17 +0000 (18:52 +0000)]
split diagnostics examples out to its own file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67318
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 19 Mar 2009 18:33:54 +0000 (18:33 +0000)]
Add a clarifying comment about HasPrototype's computation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67316
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 19 Mar 2009 18:21:42 +0000 (18:21 +0000)]
Support langkind_cxx_pch when determining the language dialect.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67315
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 19 Mar 2009 18:15:34 +0000 (18:15 +0000)]
When looking for property name (or getter method) in a
dot-syntax expression after earching the list of protocols
in the qualified-id, must keep searching the protocol list
of each of the protocols in the list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67314
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 19 Mar 2009 18:14:46 +0000 (18:14 +0000)]
If a function is declared as, e.g.,
F f;
where F is a typedef of a function type, then the function "f" has a
prototype. This is a slight tweak to Chris's suggested fix in
PR3817. Fixes PR3817 and PR3840.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67313
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 19 Mar 2009 17:36:04 +0000 (17:36 +0000)]
Driver/clang: -mattr strings were not comma separated.
- Apologies for commits w/o test cases; they are coming.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67310
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 19 Mar 2009 17:26:29 +0000 (17:26 +0000)]
Introduce a new expression type, UnresolvedDeclRefExpr, that describes
dependent qualified-ids such as
Fibonacci<N - 1>::value
where N is a template parameter. These references are "unresolved"
because the name is dependent and, therefore, cannot be resolved to a
declaration node (as we would do for a DeclRefExpr or
QualifiedDeclRefExpr). UnresolvedDeclRefExprs instantiate to
DeclRefExprs, QualifiedDeclRefExprs, etc.
Also, be a bit more careful about keeping only a single set of
specializations for a class template, and instantiating from the
definition of that template rather than a previous declaration. In
general, we need a better solution for this for all TagDecls, because
it's too easy to accidentally look at a declaration that isn't the
definition.
We can now process a simple Fibonacci computation described as a
template metaprogram.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67308
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 19 Mar 2009 08:27:24 +0000 (08:27 +0000)]
IRgen support for alias of global variable.
- PR3818.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67297
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 19 Mar 2009 08:03:45 +0000 (08:03 +0000)]
Driver: Compilation::Execute wasn't returning result code correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67296
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 19 Mar 2009 08:01:45 +0000 (08:01 +0000)]
Driver: Executing piped jobs with a single command is easy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67295
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 19 Mar 2009 07:57:08 +0000 (07:57 +0000)]
Driver: Claim unused input arguments when emitting "input file unused"
diagnostic (to suppress more generic unused warning).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67294
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 19 Mar 2009 07:55:12 +0000 (07:55 +0000)]
Driver: Claim -arch options when pipelining, and claim arguments that
are forwarded to GCC.
- The later is unfortunate, as it prevents us from generally warning
about anything interesting on platforms that use a generic
toolchain. However, we can't do much better without significantly
complicating things, and generally we should have proper tool chain
definitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67293
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 19 Mar 2009 07:29:38 +0000 (07:29 +0000)]
Driver: Handle "linker input" arguments.
- Make InputInfo a variant of filename, pipe, input argument,
nothing.
- Leave a FIXME in InputInfo that this should be revisited.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67292
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 19 Mar 2009 07:22:40 +0000 (07:22 +0000)]
Driver: Add Arg::renderAsInput; this is a messy area and something I
was hoping to clean up in the rewrite, but I don't see it yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67291
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Mar 2009 07:06:44 +0000 (07:06 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67290
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Mar 2009 06:52:51 +0000 (06:52 +0000)]
update our bragging about diagnostics. :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67289
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Mar 2009 04:52:30 +0000 (04:52 +0000)]
add NestedNameSpecifier.h/cpp to the xcode project file for browsing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67285
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 19 Mar 2009 04:25:59 +0000 (04:25 +0000)]
Print the context of tag types as part of pretty-printing, e.g.,
struct N::M::foo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67284
91177308 -0d34-0410-b5e6-
96231b3b80d8