Commit Graph

56866 Commits

Author SHA1 Message Date
Chris Lattner a94d139a1f various cleanups, no functionality change
llvm-svn: 67883
2009-03-28 00:16:20 +00:00
Dan Gohman 2785e4be37 Fix what surely must be a copy+pasto.
llvm-svn: 67881
2009-03-27 23:55:04 +00:00
Douglas Gregor c741fb15a5 Better way to free NestedNameSpecifiers. Thanks, Chris
llvm-svn: 67880
2009-03-27 23:54:10 +00:00
Dan Gohman 6d75876473 Initialize LiveOutInfo's APInt members to zero, as APInt's
default constructor produces an uninitialized APInt.
This fixes PR3896.

llvm-svn: 67879
2009-03-27 23:51:02 +00:00
Douglas Gregor 8aa6bf5b8e Fix <rdar://problem/6724396>, where we were silently dropping
GNU-style array designators, causing us to emit broken initializers.

llvm-svn: 67878
2009-03-27 23:40:29 +00:00
Douglas Gregor 6fcec66525 Perform a very, very ugly song-and-dance number to free the
NestedNameSpecifiers without causing problems for the FoldingSet that
contains them.

llvm-svn: 67877
2009-03-27 23:25:45 +00:00
Devang Patel afc1c1d405 Do not emit debug information for variables while generating optimized code. The llvm optimizer and code generator are not yet ready to support optimized code debugging.
llvm-svn: 67876
2009-03-27 23:16:32 +00:00
Douglas Gregor 333489bba3 Initial implementation of parsing, semantic analysis, and template
instantiation for C++ typename-specifiers such as

  typename T::type

The parsing of typename-specifiers is relatively easy thanks to
annotation tokens. When we see the "typename", we parse the
typename-specifier and produce a typename annotation token. There are
only a few places where we need to handle this. We currently parse the
typename-specifier form that terminates in an identifier, but not the
simple-template-id form, e.g.,

  typename T::template apply<U, V>

Parsing of nested-name-specifiers has a similar problem, since at this
point we don't have any representation of a class template
specialization whose template-name is unknown.

Semantic analysis is only partially complete, with some support for
template instantiation that works for simple examples. 

llvm-svn: 67875
2009-03-27 23:10:48 +00:00
Jim Grosbach 669f1d0b0b remove trailing whitespace
llvm-svn: 67874
2009-03-27 23:06:27 +00:00
Gabor Greif 41c8515b1b "ghostify" the ilist<Function> sentinel
llvm-svn: 67872
2009-03-27 22:28:33 +00:00
Ted Kremenek 8f5ec29b91 Add missing header file change.
llvm-svn: 67871
2009-03-27 22:00:38 +00:00
Sebastian Redl ec74096050 Better overload resolution for rvalue references.
llvm-svn: 67870
2009-03-27 21:36:42 +00:00
Ted Kremenek 7a621b9747 BugReporter: For control-flow edges from 'if', 'for', 'do', 'while' to
successor, using 'getEnclosingStmt()' to have the end location be the top-level
Stmt* enclosing the target Expr*.

llvm-svn: 67869
2009-03-27 21:16:25 +00:00
Eli Friedman 7044b76707 Finish off semantic analysis for regparm, and remove the warning. Also
remove a redundant error in CodeGen.

llvm-svn: 67868
2009-03-27 21:06:47 +00:00
Eli Friedman 6ecb5afcd6 Fix test failures caused by reading memory after freeing it. My fix is
rather nasty, but I can't think of a better fix off the top of my head.

llvm-svn: 67867
2009-03-27 20:56:17 +00:00
Ted Kremenek 41d865cbaa BugReporter: PathDiagnosticBuilder::ExecutionContinues now returns a
PathDiagnosticLocation.

llvm-svn: 67866
2009-03-27 20:55:39 +00:00
Chris Lattner 8e097198fc minor cleanups: make getIdentifierNamespace() be a single load
instead of a load + large inlined switch.

llvm-svn: 67864
2009-03-27 20:18:19 +00:00
Mike Stump e5fdfd5930 Fixup -fcommon and -fno-common to be more gcc compatible.
llvm-svn: 67863
2009-03-27 20:15:22 +00:00
Mike Stump ced6a2be04 Allow invertable -xno- style optins as well.
llvm-svn: 67862
2009-03-27 20:12:55 +00:00
Chris Lattner 17a1bfa9d8 reduce # const_casts, no functionality change.
llvm-svn: 67861
2009-03-27 19:19:59 +00:00
Anders Carlsson af06b977f9 It is OK to cast to a private base class if the current member belongs to the class that the private base class is a base of:
class A {};
class B : private A {
  void f(B *b) { A* a = b; }
};

llvm-svn: 67860
2009-03-27 19:01:12 +00:00
Anders Carlsson 93d35acb28 Add a Class field to the base path element structure. This holds the record decl of the class taht the base is a base of.
llvm-svn: 67859
2009-03-27 18:54:29 +00:00
Chris Lattner 586c66d5ba change Decl::DeclCtx to use a PointerIntPair instead of hand bitmangling.
llvm-svn: 67858
2009-03-27 18:46:15 +00:00
Fariborz Jahanian a2d609e2f1 Besides the warning, issue unsupported diagnostics in
ir gen. No intended change in functionality.

llvm-svn: 67857
2009-03-27 18:38:55 +00:00
Dan Gohman 8680802b1f Revert r67844. This fixes the llvm-gcc-4.2 build on Darwin.
llvm-svn: 67856
2009-03-27 18:37:13 +00:00
Julien Lerouge 15833b93cf Fix build on MacOS 10.4 systems (suggested by Mike Smith).
llvm-svn: 67855
2009-03-27 18:18:00 +00:00
Chris Lattner 839150e0d2 push line markers through -E mode.
llvm-svn: 67854
2009-03-27 17:13:49 +00:00
Ted Kremenek b3e8f6531d Update "Getting Started" with more current information about 'clang-cc' and 'clang'.
llvm-svn: 67850
2009-03-27 16:32:57 +00:00
Dan Gohman 3f50cb6cd4 Fix this test so that it doesn't spuriously fail due to some
unrelated debugging output happening to contain the string "store".

llvm-svn: 67849
2009-03-27 16:17:22 +00:00
Rafael Espindola 705f2a6cd2 Avoid hardcoding that X86 addresses have 4 operands.
llvm-svn: 67848
2009-03-27 15:57:50 +00:00
Ted Kremenek 15b3753858 analyzer plist: For PathDiagnosticControlFlowPieces, now output an array of
start-end points, where start and end are source ranges.

llvm-svn: 67847
2009-03-27 15:53:20 +00:00
Rafael Espindola 227815437a Use less hard coded constants to make the code less brittle.
llvm-svn: 67846
2009-03-27 15:45:05 +00:00
Ted Kremenek 073da05fa4 Emit aggregate "location" for PathDiagnostic to plist. This fixes <rdar://problem/6729558>.
llvm-svn: 67845
2009-03-27 15:31:11 +00:00
Duncan Sands 75d7e77a58 Reapply r66415, which was reverted in r66426 for
causing a bootstrap failure.  Bootstraps here on
x86-32-linux and x86-64-linux.  Requested by the
author Gabor Greif who says that a bug that might
have been causing the failure has since been fixed.

llvm-svn: 67844
2009-03-27 15:29:38 +00:00
Rafael Espindola e728019392 I am trying to add a segment to the X86 addresses matching to
improve TLS support (see http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090309/075220.html), but that code is VERY brittle.

This patch just makes it a bit more resistant.

llvm-svn: 67843
2009-03-27 15:26:30 +00:00
Ted Kremenek d10307debb Move declaration of 'PathDiagnostic' to the end of PathDiagnostic.h and add PathDiagnostic::getLocation().
llvm-svn: 67842
2009-03-27 15:24:36 +00:00
Daniel Dunbar a21c833d74 Driver: Pass -f[no-]pascal-strings on to clang, even if it has been
turned into -m[no-]pascal-strings by the tool chain.
 - This still has issue that derived arguments don't propogate "used"
   information correctly so spurious "argument unused" warnings will
   still show up.

llvm-svn: 67841
2009-03-27 15:22:28 +00:00
Ted Kremenek 33e6f91ec3 PathDiagnostic: replace 'std::list' with 'std::deque'
llvm-svn: 67840
2009-03-27 14:59:04 +00:00
Duncan Sands 3241b74f69 Revert r67798: it breaks llvm-gcc bootstrap on x86-64-linux, presumably due to
a miscompilation.

make[4]: Entering directory `gcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include'
if [ ! -d "./x86_64-unknown-linux-gnu/bits/stdtr1c++.h.gch" ]; then \
          mkdir -p ./x86_64-unknown-linux-gnu/bits/stdtr1c++.h.gch; \
        fi; \
        gcc-4.2.llvm-objects/./gcc/xgcc -shared-libgcc -Bgcc-4.2.llvm-objects/./gcc -nostdinc++ 
-Lgcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/src -Lgcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs 
-B/usr/local/gnat-llvm/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gnat-llvm/x86_64-unknown-linux-gnu/lib/ -isystem 
/usr/local/gnat-llvm/x86_64-unknown-linux-gnu/include -isystem /usr/local/gnat-llvm/x86_64-unknown-linux-gnu/sys-include -Winvalid-pch -Wno-deprecated -x 
c++-header -g -O2  -D_GNU_SOURCE -Igcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu 
-Igcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include -Igcc-4.2.llvm/libstdc++-v3/libsupc++ -O2 -g 
gcc-4.2.llvm/libstdc++-v3/include/precompiled/stdtr1c++.h -o x86_64-unknown-linux-gnu/bits/stdtr1c++.h.gch/O2g.gch
In file included from gcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include/tr1/repeat.h:247,
                 from gcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include/tr1/functional:1098,
                 from gcc-4.2.llvm/libstdc++-v3/include/precompiled/stdtr1c++.h:53:
gcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include/tr1/functional_iterate.h:417: internal compiler error: in ggc_recalculate_in_use_p, at 
ggc-page.c:1602
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://llvm.org/bugs/> for instructions.
make[4]: *** [x86_64-unknown-linux-gnu/bits/stdtr1c++.h.gch/O2g.gch] Error 1

llvm-svn: 67839
2009-03-27 14:56:47 +00:00
Ted Kremenek b630d5b2c9 Add iterators to PathDiagnosticControlFlowDiagnostic for iterating over the
multiple location vectors.

llvm-svn: 67838
2009-03-27 14:54:49 +00:00
Daniel Dunbar 565eefd4ab Driver: -print-libgcc-file-name was searching wrong path list.
llvm-svn: 67837
2009-03-27 14:26:33 +00:00
Mikhail Glushenkov 0f78c2721b Documentation update.
Expand a bit on various '--*-graph' options.

llvm-svn: 67836
2009-03-27 12:58:29 +00:00
Mikhail Glushenkov f4be420def -write-graph now can be used with -o.
Makes it possible to set the output file name.

llvm-svn: 67835
2009-03-27 12:57:14 +00:00
Duncan Sands 99d0b2353e Revert previous change in favour of an explanatory
comment.

llvm-svn: 67833
2009-03-27 11:35:00 +00:00
Duncan Sands af7ae6ce3c A Release-Asserts build makes it sound like assertions
are turned on, while in fact they are turned off.  Name
this Release-NoAsserts instead.

llvm-svn: 67831
2009-03-27 09:41:56 +00:00
John Mosby a1be2dcd63 Shrink wrapping in PEI: initial release. Finishing development, enable with --shrink-wrap.
llvm-svn: 67828
2009-03-27 06:09:40 +00:00
Anders Carlsson 733d77f1b4 Implement checking for base class access. Right now it's overly conservative but that will change. (Also, protected isn't implemented right now).
llvm-svn: 67827
2009-03-27 06:03:27 +00:00
Douglas Gregor 0b08ba44a1 If the user is trying to apply the -> or . member reference operator
to a function or function pointer, it's probably because the user
forgot to put in parentheses () to call the function.

llvm-svn: 67826
2009-03-27 06:00:30 +00:00
Zhongxing Xu 17e28b7a54 remove dead code.
llvm-svn: 67825
2009-03-27 05:31:12 +00:00
Douglas Gregor 43f1bdbdc3 Update CMake
llvm-svn: 67824
2009-03-27 05:18:33 +00:00