Commit Graph

888 Commits

Author SHA1 Message Date
Chris Lattner 200e0757c7 switch the .ll parser to use SourceMgr.
llvm-svn: 74735
2009-07-02 23:08:13 +00:00
Chris Lattner cc64cc9313 add an explicit class for holding llvm::SourceMgr diagnostics and use
it to print them.  This gives us column numbers in the diag line.  Before:

t.s:4: error: unexpected token in argument list
 mov %eax %edx
          ^

now:
t.s:4:11: error: unexpected token in argument list
 mov %eax %edx
          ^

llvm-svn: 74732
2009-07-02 22:24:20 +00:00
Daniel Dunbar 4aef67c99d Tweak FindExecutable so that relative executable paths work as well.
llvm-svn: 74645
2009-07-01 21:36:28 +00:00
Daniel Dunbar b8f779db87 Fix FindExecutable to work if given an absolute executable path name.
- Patch by Viktor Kutuzov, with tweaks by me.

llvm-svn: 74608
2009-07-01 15:26:13 +00:00
Dan Gohman 10f1733d9a Reapply 74494, this time removing the conflicting definition of operator<<
in APIntTest.cpp.

llvm-svn: 74550
2009-06-30 20:10:56 +00:00
Bill Wendling 778a517725 Temporarily revert r74494. It was causing failures in the unit tests.
llvm-svn: 74515
2009-06-30 07:05:27 +00:00
Owen Anderson 00d07afe98 Fix the build on Cygwin. Patch by Aaron Gray.
llvm-svn: 74510
2009-06-30 05:33:46 +00:00
Dan Gohman e95d409bdd Define an operator<< for APInt to be used with std::ostream.
This will allow it to be used in unittests that use gtest's
EXPECT_EQ.

llvm-svn: 74494
2009-06-30 01:28:08 +00:00
Daniel Dunbar c9dc78ae40 Normalize SourceMgr messages.
- Don't print "Parsing" in front of every message.

 - Take additional "type" argument which is prepended to the message (with ": ")
   if given.

 - Update clients to print errors (warnings) as:
<filename>:<line number>: error(warning): ...

llvm-svn: 74489
2009-06-30 00:49:23 +00:00
Duncan Sands 14814d4477 Add triple for OpenBSD.
llvm-svn: 74422
2009-06-29 13:36:13 +00:00
Owen Anderson 4a03279231 Use atomic operations for accessing this global counter.
llvm-svn: 74294
2009-06-26 18:09:03 +00:00
Douglas Gregor 6d94e6a5f3 Fix linking of llvm-ld and lli with CMake, from Xerxes Rånby
llvm-svn: 74285
2009-06-26 15:37:00 +00:00
Owen Anderson 76cfd205ff Support thread-local pretty stack traces.
llvm-svn: 74227
2009-06-25 23:31:33 +00:00
Owen Anderson ca8f986f63 Use atomic operations when accessing statistics, and make the lazy initialization of statistics actually threadsafe.
llvm-svn: 74005
2009-06-23 21:19:38 +00:00
Owen Anderson e9b1beb543 Make timers threadsafe again. This isn't quite as nice as I'd hoped (it uses locking rather than atomic arithmetic),
but should work on all the platforms we care about.

I might revisit this if a totally awesome way to do it occurs to me.

llvm-svn: 74002
2009-06-23 20:52:29 +00:00
Owen Anderson 5cc4131063 Revert my last series of commits related to Timer and 64-bit atomics. Not all the targets
we care about are capable of supporting it.

llvm-svn: 73993
2009-06-23 20:17:22 +00:00
Lang Hames c547bad3ff Switched size_t to int64_t to prevent type mismatch in call to max.
llvm-svn: 73988
2009-06-23 19:49:23 +00:00
Owen Anderson ddf74dc986 Actually, these need to be signed integers, not unsigned.
llvm-svn: 73978
2009-06-23 18:21:13 +00:00
Owen Anderson bf45b3e2ad Use 64-bit integer counters for tracking time, rather than doubles. This will be more atomic op friendly.
llvm-svn: 73974
2009-06-23 18:12:30 +00:00
Owen Anderson 4ed41c8be8 Make the lazy initialization of DefaultTimerGroup threadsafe.
llvm-svn: 73963
2009-06-23 17:33:37 +00:00
Owen Anderson 891fe79672 Revert r73923, which broke clang.
llvm-svn: 73957
2009-06-23 16:36:10 +00:00
Owen Anderson bee30f58fb Guard the plugin loader.
llvm-svn: 73925
2009-06-23 00:02:39 +00:00
Owen Anderson 977c6b8998 Add guards around timer groups, which can be shared.
llvm-svn: 73923
2009-06-22 23:37:06 +00:00
Owen Anderson 975ce637db Guard the statistics table.
llvm-svn: 73916
2009-06-22 23:08:27 +00:00
Owen Anderson 2d2ed3c54b Guard the global annotation tables.
llvm-svn: 73913
2009-06-22 22:44:15 +00:00
Chris Lattner 2adc9e739c rename SourceMgr::PrintError to PrintMessage.
llvm-svn: 73861
2009-06-21 21:22:11 +00:00
Chris Lattner 976af622a9 move include searching logic from TGLexer to SourceMgr.
llvm-svn: 73845
2009-06-21 05:06:04 +00:00
Chris Lattner fd255754af Rename TGSourceMgr -> SourceMgr.
llvm-svn: 73844
2009-06-21 03:41:50 +00:00
Chris Lattner 526c8cb557 rename TGLoc -> SMLoc.
llvm-svn: 73843
2009-06-21 03:39:35 +00:00
Chris Lattner 1b30e1ac45 move TGSourceMgr class out of TableGen into libsupport.
llvm-svn: 73842
2009-06-21 03:36:54 +00:00
Duncan Sands 0de39b42ff Add support for AuroraUX. Patch by evocallaghan.
llvm-svn: 73766
2009-06-19 14:40:01 +00:00
Ted Kremenek 81ef65d491 Update CMake files to account for new location of Threading.cpp.
llvm-svn: 73708
2009-06-18 17:47:09 +00:00
Owen Anderson 7d42b95b6c Move Threading.[h|cpp] from Support to System.
llvm-svn: 73707
2009-06-18 16:54:52 +00:00
Owen Anderson 993e4261d0 Add newline at end of file.
llvm-svn: 73551
2009-06-16 20:53:09 +00:00
Douglas Gregor c791c37633 Add Threading.cpp to the CMake project files
llvm-svn: 73516
2009-06-16 17:45:38 +00:00
Owen Anderson 4cb4b6191a Split the thread-related APIs out into their own file, and add a few more
calls for convenience.

llvm-svn: 73512
2009-06-16 17:33:51 +00:00
Torok Edwin 9b5a47fc3c Add support for outputting ANSI colors to raw_fd_ostream.
llvm-svn: 72854
2009-06-04 07:09:50 +00:00
Mike Stump 799bf5855e Add support for letting the client choose different flavors of NaNs. Testcase to be
added in clang.

llvm-svn: 72606
2009-05-30 03:49:43 +00:00
Bill Wendling 09f17a8479 Untabification.
llvm-svn: 72604
2009-05-30 01:09:53 +00:00
Douglas Gregor bbcf90f936 Minor fix for CMake build system
llvm-svn: 72480
2009-05-27 16:52:17 +00:00
Daniel Dunbar e3384c4f2e Add llvm::triple constructor from arch, vendor, os strings, and recognize
DragonFly OS type.

llvm-svn: 72242
2009-05-22 02:24:11 +00:00
Evan Cheng db338f3f41 80 column violation.
llvm-svn: 72235
2009-05-21 23:47:47 +00:00
Owen Anderson e147774b05 Have llvm_start_multithreaded return a bool indicating whether multithreaded
initialization succeeded or not, rather than just asserting.

llvm-svn: 72182
2009-05-20 21:03:06 +00:00
Owen Anderson b9a4a57699 Add llvm_start_multithreaded(), which starts up the LLVM internals in thread-safe mode. Provide double-check locking
initialization of ManagedStatic's when running in thread-safe mode.

llvm-svn: 72151
2009-05-20 00:39:20 +00:00
Eli Friedman a97f07f22d Tweak MemoryBuffer::getSTDIN so that it returns after the first EOF.
It doesn't matter for piped input, but it's annoying when typing at the 
console.

llvm-svn: 71998
2009-05-18 08:44:04 +00:00
Mike Stump 0e78566e02 Add dumping support for DW_AT_APPLE_isa and DW_AT_APPLE_block.
Radar 6867696

llvm-svn: 71750
2009-05-14 00:03:51 +00:00
Mike Stump 889285d467 Fix whitespacing (space after switch).
llvm-svn: 71738
2009-05-13 23:23:20 +00:00
Jay Foad fe0c648fee Move helper functions for optimizing division by constant into the APInt
class.

llvm-svn: 70488
2009-04-30 10:15:35 +00:00
Bill Wendling db59fda319 Add support for a character after a command line option. Like '-Os'.
llvm-svn: 70437
2009-04-29 23:26:16 +00:00
Chris Lattner b869a0ade1 Fix PR4040: APInt's string constructor is too strict
patch by Jeff Yasskin!

llvm-svn: 70058
2009-04-25 18:34:04 +00:00