From 16fcf0aa52eb140832a276ad41ad86983a1d7a15 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Fri, 26 Feb 2016 16:34:01 +0000 Subject: [PATCH] Basic: fix __USER_LABEL_PREFIX__ on Cygwin Adjust the user label prefix for cygwin x86_64. Resolves PR26744. llvm-svn: 262030 --- clang/lib/Basic/Targets.cpp | 1 + clang/test/Preprocessor/init.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 46532ff9160c..040dedaff145 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -4226,6 +4226,7 @@ public: : X86_64TargetInfo(Triple) { TLSSupported = false; WCharType = UnsignedShort; + UserLabelPrefix = ""; } void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override { diff --git a/clang/test/Preprocessor/init.c b/clang/test/Preprocessor/init.c index 73dc4b546064..0dd16c74fc09 100644 --- a/clang/test/Preprocessor/init.c +++ b/clang/test/Preprocessor/init.c @@ -9049,3 +9049,10 @@ // WEBASSEMBLY64-NEXT:#define __wasm64 1 // WEBASSEMBLY64-NEXT:#define __wasm64__ 1 // WEBASSEMBLY64-NEXT:#define __wasm__ 1 + +// RUN: %clang_cc1 -E -dM -ffreestanding -triple i686-windows-cygnus < /dev/null | FileCheck -match-full-lines -check-prefix CYGWIN-X32 %s +// CYGWIN-X32: #define __USER_LABEL_PREFIX__ _ + +// RUN: %clang_cc1 -E -dM -ffreestanding -triple x86_64-windows-cygnus < /dev/null | FileCheck -match-full-lines -check-prefix CYGWIN-X64 %s +// CYGWIN-X64: #define __USER_LABEL_PREFIX__ +