Commit Graph

141379 Commits

Author SHA1 Message Date
Bill Wendling 7754389526 Push some more methods down to hide the use of the Attribute class.
Because the Attribute class is going to stop representing a collection of
attributes, limit the use of it as an aggregate in favor of using AttributeSet.
This replaces some of the uses for querying the function attributes.

llvm-svn: 172844
2013-01-18 21:11:39 +00:00
Argyrios Kyrtzidis 8bee90d5f3 [PCH/Modules] Re-apply r172620 and r172629, now with 100% less infinite loops!
Makes sure that a deserialized macro is only added to the preprocessor macro definitions only once.
Unfortunately I couldn't get a reduced test case.

rdar://13016031

llvm-svn: 172843
2013-01-18 20:59:01 +00:00
Jack Carter 86c2c564ff This is a resubmittal. For some reason it broke the bots yesterday
but I cannot reproduce the problem and have scrubed my sources and
even tested with llvm-lit -v --vg.

Removal of redundant code and formatting fixes.

Contributers: Jack Carter/Vladimir Medic
 
llvm-svn: 172842
2013-01-18 20:15:06 +00:00
Daniel Dunbar 4f8e3f5b6a [Linker] Zap a dead typedef.
llvm-svn: 172841
2013-01-18 20:08:09 +00:00
Matt Kopec 166b608336 Use insert instead of emplace until support/distribution improves on some platforms (ie. Linux).
llvm-svn: 172840
2013-01-18 20:03:54 +00:00
Benjamin Kramer 0eba5775f3 Silence GCC warning about dropping off a non-void function.
llvm-svn: 172839
2013-01-18 19:45:22 +00:00
Daniel Dunbar a32a546dcb [Linker] Kill Linker::LoadObject which is dead, and drop the BitReader dependency again.
llvm-svn: 172838
2013-01-18 19:37:11 +00:00
Daniel Dunbar 9585612876 [MC/Mach-O] Implement integrated assembler support for linker options.
- Also, fixup syntax errors in LangRef and missing newline in the MCAsmStreamer.

llvm-svn: 172837
2013-01-18 19:37:00 +00:00
Dmitri Gribenko 09a682ab5a Documentation: remove all mentions of DejaGNU and Tcl
We don't have DejaGNU tests now.

llvm-svn: 172836
2013-01-18 19:27:43 +00:00
Eli Bendersky f747bd621d Streamline the mentions of grep and FileCheck in TestingGuide.rst
grep is now only mentioned once in a sentence that explicitly says it's
deprecated. For FileCheck, there's no reason to repeat part of the
documentation that exists in CommandGuide/FileCheck.

llvm-svn: 172835
2013-01-18 19:01:34 +00:00
Nico Weber 0bba2d11d0 Fix parsing of class specifiers before '\n' 'operator'.
r159549 / r159164 regressed clang to reject

  struct s {};
  struct s
  operator++(struct s a)
  { return a; }

This fixes the regression. Richard, pleas check if this looks right.

llvm-svn: 172834
2013-01-18 18:41:42 +00:00
Jordan Rose 1dc3940383 [analyzer] Special path notes for C++ special member functions.
Examples:
  Calling implicit default constructor for Foo
  Calling defaulted move constructor for Foo
  Calling copy constructor for Foo
  Calling implicit destructor for Foo
  Calling defaulted move assignment operator for Foo
  Calling copy assignment operator for Foo

llvm-svn: 172833
2013-01-18 18:27:21 +00:00
Jordan Rose fe856d58a3 [analyzer] Do a better job describing C++ member functions in the call stack.
Examples:
  Calling constructor for 'Foo'
  Entered call from 'Foo::create'

llvm-svn: 172832
2013-01-18 18:27:14 +00:00
Manuel Klimek 05d82b72f1 Fix comment.
llvm-svn: 172831
2013-01-18 18:24:28 +00:00
Alexey Samsonov 67c8e14760 Fix a typo from r172289
llvm-svn: 172830
2013-01-18 17:03:47 +00:00
Alexey Samsonov b068483d4d CMake: Generalize build rules for different arches for sanitizer_common, asan, ubsan
llvm-svn: 172829
2013-01-18 16:51:07 +00:00
Alexander Potapenko b4ba995366 [ASan] Fix the log_path option to use different log files for parent and child processes after fork().
llvm-svn: 172828
2013-01-18 16:44:27 +00:00
Evgeniy Stepanov 8a3666f63c [sanitizer] Workaround broken mktemp on certain platforms.
llvm-svn: 172827
2013-01-18 16:24:50 +00:00
Alexey Samsonov 163ab9d0a5 CMake: create AddCompilerRT module and implement convenience add_compiler_rt_object_library function
llvm-svn: 172826
2013-01-18 16:05:21 +00:00
Evgeniy Stepanov c8cde8d736 [sanitizer] Enable cpplint for .inc files.
llvm-svn: 172825
2013-01-18 15:53:43 +00:00
Benjamin Kramer d4c212eb60 The IR linker still depends on the bitcode reader.
llvm-svn: 172824
2013-01-18 15:03:03 +00:00
NAKAMURA Takumi b72e763325 llvm/test/CodeGen/X86/Atomics-64.ll: Tweak for 2nd RUN not to overwrite %t. It sometimes causes spurious failure on lit win32.
Feel free to prune or suppress each output.

llvm-svn: 172823
2013-01-18 14:52:02 +00:00
Manuel Klimek da08761bb2 Fixes issues around pulling in the next line in simple if statements.
llvm-svn: 172822
2013-01-18 14:46:43 +00:00
NAKAMURA Takumi 40ac112c91 Introduce llvm::sys::PrintStackTraceOnErrorSignal()
llvm-svn: 172821
2013-01-18 14:31:00 +00:00
NAKAMURA Takumi d6a707f20e clang/test/CodeGen: Suppress a couple of tests on win32. It seems -fsanitize-blacklist doesn't accept DOSish pathnames.
llvm-svn: 172820
2013-01-18 14:11:04 +00:00
Manuel Klimek d3b92fa61e Fixes problems with line merging in the face of preprocessor directives.
This patch prepares being able to test for and fix more problems (see
FIXME in the test for example).

Previously we would output unwrapped lines for preprocessor directives
at the point where we also parsed the hash token. Since often
projections only terminate (and thus output their own unwrapped line)
after peeking at the next token, this would lead to the formatter seeing
the preprocessor directives out-of-order (slightly earlier). To be able
to correctly identify lines to merge, the formatter needs a well-defined
order of unwrapped lines, which this patch introduces.

llvm-svn: 172819
2013-01-18 14:04:34 +00:00
NAKAMURA Takumi 8b517f1076 clang-check: Introduce llvm::sys::PrintStackTraceOnErrorSignal()
llvm-svn: 172818
2013-01-18 13:46:48 +00:00
Evgeniy Stepanov 01671c33ff [sanitizer] lint
llvm-svn: 172817
2013-01-18 13:12:56 +00:00
Alexey Samsonov 4b0ee8ecd5 CMake: start to generalize rules for non-x86 architectures
llvm-svn: 172816
2013-01-18 13:10:42 +00:00
Kostya Serebryany 84c7e47b5c [asan] kill some dead code
llvm-svn: 172815
2013-01-18 13:01:44 +00:00
Evgeniy Stepanov a6c4a387ee [sanitizer] Rename 2 files *.h->*.inc as appropriate.
Also add a missing include.

llvm-svn: 172814
2013-01-18 13:01:18 +00:00
Alexey Samsonov 46c5a5549e 80 columns
llvm-svn: 172813
2013-01-18 12:49:06 +00:00
Alexey Samsonov 193b45f4fe CMake variables renaming: X86_64->x86_64 I386->i386
llvm-svn: 172812
2013-01-18 12:45:44 +00:00
Evgeniy Stepanov 518a135ffe [sanitizer] Remove an unused variable.
llvm-svn: 172811
2013-01-18 12:32:02 +00:00
Alexander Potapenko a6d40f638e [ASan] Fix compilation on Mac.
llvm-svn: 172810
2013-01-18 12:31:16 +00:00
Evgeniy Stepanov 91181eaa59 [sanitizer] Fix Mac build.
llvm-svn: 172809
2013-01-18 11:38:23 +00:00
Will Dietz f54319c891 [ubsan] Add support for -fsanitize-blacklist
llvm-svn: 172808
2013-01-18 11:30:38 +00:00
Kostya Serebryany 63c36bbe5e [asan] fix two off-by-one errors that seem to affect only PowerPC because only there the stack top may be equal to the address space top. Noted by Andreas Schwab in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55975#c11 . Also make swapcontext interceptor a bit more robust
llvm-svn: 172807
2013-01-18 11:30:36 +00:00
Will Dietz b9eb34e100 Move Blacklist.h to include/ to enable use from clang.
llvm-svn: 172806
2013-01-18 11:29:21 +00:00
Evgeniy Stepanov 222076e972 [sanitizer] Common *scanf interceptors.
llvm-svn: 172805
2013-01-18 11:17:23 +00:00
Daniel Jasper 04468962ab Reduce penalty for splitting between ")" and ".".
').' is likely part of a builder pattern statement.
This is based upon a patch developed by Nico Weber. Thank you!

Before:
int foo() {
  return llvm::StringSwitch<Reference::Kind>(name).StartsWith(
      ".eh_frame_hdr", ORDER_EH_FRAMEHDR).StartsWith(
      ".eh_frame", ORDER_EH_FRAME).StartsWith(".init", ORDER_INIT).StartsWith(
      ".fini", ORDER_FINI).StartsWith(".hash", ORDER_HASH).Default(ORDER_TEXT);
}

After:
int foo() {
  return llvm::StringSwitch<Reference::Kind>(name)
         .StartsWith(".eh_frame_hdr", ORDER_EH_FRAMEHDR)
         .StartsWith(".eh_frame", ORDER_EH_FRAME)
         .StartsWith(".init", ORDER_INIT).StartsWith(".fini", ORDER_FINI)
         .StartsWith(".hash", ORDER_HASH).Default(ORDER_TEXT);
}

Probably not ideal, but makes many cases much more readable.

The changes to overriding-ftemplate-comments.cpp don't seem better or
worse. We should address those soon.

llvm-svn: 172804
2013-01-18 10:56:38 +00:00
Alexander Potapenko 51794a390f Remove references to pthread_workqueue_additem_np(), which isn't in the official libdispatch API.
llvm-svn: 172802
2013-01-18 10:27:31 +00:00
Manuel Klimek 946d219c47 Add basic command line parsing to TestMain.
Summary:
This allows unit tests for components that use Support/Debug.h to print
debug information from test runs by specifying -debug when running the
test.

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D301

llvm-svn: 172801
2013-01-18 10:18:50 +00:00
Alexey Samsonov 9585613334 [ASan] fixes for Android build
llvm-svn: 172800
2013-01-18 09:20:06 +00:00
Daniel Jasper 997b08ce3c Also align trailing line comments in include directives.
Before:
  #include <a> // for x
  #include <a/b/c> // for yz
After:
  #include <a>     // for x
  #include <a/b/c> // for yz

llvm-svn: 172799
2013-01-18 09:19:33 +00:00
Daniel Jasper aa701fa3ad Let the formatter align trailing line comments where possible.
Before:
int a; // comment
int bbbbb; // comment

After:
int a;     // comment
int bbbbb; // comment

llvm-svn: 172798
2013-01-18 08:44:07 +00:00
Craig Topper 1cb8aa581b Calculate vector element size more directly for VINSERTF128/VEXTRACTF128 immediate handling. Also use MVT since this only called on legal types during pattern matching.
llvm-svn: 172797
2013-01-18 08:41:28 +00:00
Craig Topper e938138daf Minor formatting fix. No functional change.
llvm-svn: 172795
2013-01-18 07:27:20 +00:00
Dmitri Gribenko 6f3290e599 Remove support for Tcl test format since nobody uses it
llvm-svn: 172794
2013-01-18 06:57:01 +00:00
Craig Topper 908f7d14b5 Spelling fix: extened->extended. Trailing whitespace in same function.
llvm-svn: 172793
2013-01-18 06:50:59 +00:00