Issue 184367
Summary Clang gives local constants a different PDB symbol type than MSVC
Labels debuginfo
Assignees
Reporter speednoisemovement
    Not sure this is a bug per se but recording to follow up from https://github.com/swiftlang/llvm-project/pull/12414#discussion_r2873761876

With main.cpp:
``` 
int main() {
    static const int kConstant = 42;
 return kConstant;
}
```
`cl.exe /Zi /Fetest_cl.exe main.cpp /link /DEBUG`
`clang-cl.exe /Zi /Fetest_clang_cl.exe main.cpp /link /DEBUG`

```
> cvdump.exe -s test_cl.pdb | Select-String kConstant

(0000F8)  S_CONSTANT: Type:             0x1002, Value: 42, `main'::`2'::kConstant
```

```
cvdump.exe -s test_clang_cl.pdb | Select-String kConstant

(0000CC)  S_LDATA32: [0002:00000F20], Type: 0x1002, kConstant
```

(note that the display name is also different)

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to