diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-09-22 03:34:40 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-22 03:34:40 +0000 |
commit | c827d9ee0e540481cb1e32e081cc5a4777437ee9 (patch) | |
tree | 92354092de34c4ce02feed918fbfea602b111190 /llvm/lib/Support/StringRef.cpp | |
parent | 5de27daf93c167a0108d8549db3f89055656a0e7 (diff) | |
download | llvm-c827d9ee0e540481cb1e32e081cc5a4777437ee9.zip llvm-c827d9ee0e540481cb1e32e081cc5a4777437ee9.tar.gz llvm-c827d9ee0e540481cb1e32e081cc5a4777437ee9.tar.bz2 |
Workaround what I believe is an MSVC bug where it emits a definition for a
static const class member into each translation unit, with external linkage???
- If someone understands this issue better, please clue me in, I haven't
consulted the standard yet.
llvm-svn: 82516
Diffstat (limited to 'llvm/lib/Support/StringRef.cpp')
-rw-r--r-- | llvm/lib/Support/StringRef.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Support/StringRef.cpp b/llvm/lib/Support/StringRef.cpp index a4c0e87..deaa19e 100644 --- a/llvm/lib/Support/StringRef.cpp +++ b/llvm/lib/Support/StringRef.cpp @@ -10,7 +10,10 @@ #include "llvm/ADT/StringRef.h" using namespace llvm; +// MSVC emits references to this into the translation units which reference it. +#ifndef _MSC_VER const size_t StringRef::npos; +#endif //===----------------------------------------------------------------------===// // String Searching |