summaryrefslogtreecommitdiff
path: root/lib/Support/StringRef.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-22 03:34:40 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-22 03:34:40 +0000
commit77696bebbcb011be861571b105193fc53614c153 (patch)
tree47e40900836f93a4b6192e5a2c9d47d160e001cf /lib/Support/StringRef.cpp
parent48a097bfb6b2ab1ed67d2341a5b51c5d2b61af5b (diff)
downloadllvm-77696bebbcb011be861571b105193fc53614c153.tar.gz
llvm-77696bebbcb011be861571b105193fc53614c153.tar.bz2
llvm-77696bebbcb011be861571b105193fc53614c153.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/StringRef.cpp')
-rw-r--r--lib/Support/StringRef.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Support/StringRef.cpp b/lib/Support/StringRef.cpp
index a4c0e87c28..deaa19efe9 100644
--- a/lib/Support/StringRef.cpp
+++ b/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