-
Notifications
You must be signed in to change notification settings - Fork 11.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use windows baskslash on anonymous tag locations if using MSVCFormatt…
…ing and it's not absolute path. This fixes a nondeterminism on debug info when building on windows natively vs cross building to windows. [1] https://github.com/llvm/llvm-project/blob/llvmorg-17-init/clang/lib/Lex/HeaderSearch.cpp#L465 Differential Revision: https://reviews.llvm.org/D150817
- Loading branch information
Showing
4 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#include "Inputs/debug-info-slash.h" | ||
int main() { a(); return 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
template <typename... T> | ||
void f1() {} | ||
void a() { | ||
auto Lambda = [] {}; | ||
f1<decltype(Lambda)>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
RUN: rm -rf %t-dir | ||
RUN: mkdir -p %t-dir/header/Inputs | ||
RUN: cp %S/Inputs/debug-info-slash.cpp %t-dir/ | ||
RUN: cp %S/Inputs/debug-info-slash.h %t-dir/header/Inputs | ||
RUN: cd %t-dir | ||
RUN: %clang -target x86_64-pc-win32 -emit-llvm -S -g %t-dir/debug-info-slash.cpp -Iheader -o - | FileCheck --check-prefix=WIN %s | ||
RUN: %clang -target x86_64-linux-gnu -emit-llvm -S -g %t-dir/debug-info-slash.cpp -Iheader -o - | FileCheck --check-prefix=LINUX %s | ||
|
||
WIN: lambda at header\\Inputs\\debug-info-slash.h | ||
LINUX: lambda at header/Inputs/debug-info-slash.h |