Skip to content

Commit

Permalink
[AArch64] Don't redefine _LP64 and __LP64__
Browse files Browse the repository at this point in the history
Don't define these macros in AArch64TargetInfo::getTargetDefines, as
they're already defined in InitializePredefinedMacros and the
redefinition causes unwanted warnings with -Wsystem-headers.
  • Loading branch information
john-brawn-arm committed May 17, 2023
1 parent 2fb7506 commit e55d52c
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions clang/lib/Basic/Targets/AArch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,6 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts,
getTriple().isOSBinFormatELF())
Builder.defineMacro("__ELF__");

// Target properties.
if (!getTriple().isOSWindows() && getTriple().isArch64Bit()) {
Builder.defineMacro("_LP64");
Builder.defineMacro("__LP64__");
}

std::string CodeModel = getTargetOpts().CodeModel;
if (CodeModel == "default")
CodeModel = "small";
Expand Down

0 comments on commit e55d52c

Please sign in to comment.