Per PR2773, define __USER_LABEL_PREFIX__ for x86-32 Linux and Windows.
If you're on some other platform, the correct definition for this macro
would be appreciated; to find the correct definition, just run the
following command:
echo | gcc -dM -E - | grep USER_LABEL_PREFIX
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55869 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index dfaef75..53a192e 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -698,6 +698,7 @@
virtual void getTargetDefines(std::vector<char> &Defines) const {
X86_32TargetInfo::getTargetDefines(Defines);
getLinuxDefines(Defines);
+ Define(Defines, "__USER_LABEL_PREFIX__", "");
}
};
} // end anonymous namespace
@@ -724,6 +725,7 @@
Define(Defines, "WINNT");
Define(Defines, "_X86_");
Define(Defines, "__MSVCRT__");
+ Define(Defines, "__USER_LABEL_PREFIX__", "_");
}
};
} // end anonymous namespace