Displaying 8 results from an estimated 8 matches for "definemacro".
2017 May 11
3
problem (and fix) with -fms-extensions
...sor.cpp,v
retrieving revision 1.1.1.4
diff -u -p -r1.1.1.4 InitPreprocessor.cpp
--- lib/Frontend/InitPreprocessor.cpp 14 Mar 2017 08:07:56 -0000 1.1.1.4
+++ lib/Frontend/InitPreprocessor.cpp 11 May 2017 17:54:41 -0000
@@ -366,6 +366,8 @@ static void InitializeStandardPredefined
else
Builder.defineMacro("__STDC_HOSTED__");
+ if (LangOpts.MicrosoftMode)
+ Builder.defineMacro("__ms_extensions__", 1);
if (!LangOpts.CPlusPlus) {
if (LangOpts.C11)
Builder.defineMacro("__STDC_VERSION__", "201112L");
-------------- next part --------------
Inde...
2017 May 12
2
problem (and fix) with -fms-extensions
...-r1.1.1.4 InitPreprocessor.cpp
> > --- lib/Frontend/InitPreprocessor.cpp 14 Mar 2017 08:07:56 -0000 1.1.1.4
> > +++ lib/Frontend/InitPreprocessor.cpp 11 May 2017 17:54:41 -0000
> > @@ -366,6 +366,8 @@ static void InitializeStandardPredefined
> > else
> > Builder.defineMacro("__STDC_HOSTED__");
> >
> > + if (LangOpts.MicrosoftMode)
> > + Builder.defineMacro("__ms_extensions__", 1);
> > if (!LangOpts.CPlusPlus) {
> > if (LangOpts.C11)
> > Builder.defineMacro("__STDC_VERSION__", "2011...
2013 Aug 22
0
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt (Clang patch)
...ch() == llvm::Triple::x86_64)
+ Target.setEnvironment(llvm::Triple::GNUX32);
}
return Target;
--- ./tools/clang/lib/Basic/Targets.cpp.orig 2013-08-18
12:00:04.501402572 +0000
+++ ./tools/clang/lib/Basic/Targets.cpp 2013-08-18 12:08:11.086175660
+0000
@@ -2384,6 +2384,14 @@
Builder.defineMacro("__amd64");
Builder.defineMacro("__x86_64");
Builder.defineMacro("__x86_64__");
+ if (PointerWidth == 64 && getLongWidth() == 64) {
+ Builder.defineMacro("_LP64");
+ Builder.defineMacro("__LP64__");
+ } else if (P...
2013 Aug 22
7
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
Hi,
I'm working on bringing up complete coverage for a Gentoo x32 "desktop"
system. I've been cooking up quite a few patches for various packages
to push upstream, but right now, the biggest blocker is the lack of
support for building with/codegen targeting x32 in llvm/clang. Since
the x32 patches were sent last year, I see support code has landed in
LLVM, and basic handling of
2013 Aug 22
3
[LLVMdev] [NEW PATCH] X32 ABI support for Clang/compiler-rt (Clang patch)
...p<m_Group>;
def march_EQ : Joined<["-"], "march=">, Group<m_Group>;
--- ./tools/clang/lib/Basic/Targets.cpp.orig 2013-08-18
12:00:04.501402572 +0000
+++ ./tools/clang/lib/Basic/Targets.cpp 2013-08-18 12:08:11.086175660
+0000
@@ -2384,6 +2384,14 @@
Builder.defineMacro("__amd64");
Builder.defineMacro("__x86_64");
Builder.defineMacro("__x86_64__");
+ if (PointerWidth == 64 && getLongWidth() == 64) {
+ Builder.defineMacro("_LP64");
+ Builder.defineMacro("__LP64__");
+ } else if (P...
2012 Jul 07
0
[LLVMdev] Changing Endian in TargetData
No luck there with modifying clang/lib/Basic/Targets.cpp unfortunately. I
only modified BigEndian to 'true' and Builder.defineMacro to
"__BIG_ENDIAN__"
On Sat, Jul 7, 2012 at 2:34 AM, Anton Korobeynikov
<anton at korobeynikov.info>wrote:
> > Oh sorry, clang.
> Then you should modify clang, not backends, look into Basic/Targets.cpp
> there.
>
> PS: Note the "Reply All" button in your...
2012 Jul 07
5
[LLVMdev] Changing Endian in TargetData
I'm trying to change the Endian of X86 from little to big in the
TargetData. I only care about the way in which this effects the LLVM IR,
not the actual backend code. I've changed the "e-" to "E-" in
X86TargetMachine.cpp (where it sets the DataLayout) with no luck. Are there
any other obvious places that I need to change this?
The TargetData docs were somewhat helpful
2014 Nov 03
8
[LLVMdev] [PATCH] Protection against stack-based memory corruption errors using SafeStack
...guments.
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp
index 476e214..16d8646 100644
--- a/lib/Frontend/InitPreprocessor.cpp
+++ b/lib/Frontend/InitPreprocessor.cpp
@@ -826,6 +826,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
Builder.defineMacro("__SSP_STRONG__", "2");
else if (LangOpts.getStackProtector() == LangOptions::SSPReq)
Builder.defineMacro("__SSP_ALL__", "3");
+ else if (LangOpts.getStackProtector() == LangOptions::SSPSafeStack)
+ Builder.defineMacro("__SAFESTACK__", &...