[Lldb-commits] [PATCH] D56904: [NativePDB] Process virtual bases in the correct order

Aleksandr Urakov via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 29 05:16:28 PST 2019


aleksandr.urakov marked an inline comment as done.
aleksandr.urakov added inline comments.


================
Comment at: lit/SymbolFile/NativePDB/tag-types.cpp:5
 // Test that we can display tag types.
 // RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s 
 // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
----------------
zturner wrote:
> aleksandr.urakov wrote:
> > Clang gives me an error about char16_t, char32_t etc., but if I use MSVC here, then the test compiles ok.
> Usually this means clang cannot find your CRT headers.  Can you run with -verbose?  That should give you some insight into the environment we are running clang with, and might be a clue why it can't find the headers.
Can you give me little more hints on this, please? I've run the verbose build and it have given me the following:
```
compiling tag-types.cpp -> tag-types.cpp.tmp.exe-tag-types.obj
  Command Line: C:\Work\llvm\build_x64\bin\clang-cl.exe -m64 /Od /GS- /GR- /Z7 -Xclang -fkeep-static-consts /c /FoC:\Work\llvm\build_x64\tools\lldb\lit\SymbolFile\NativePDB\Output\tag-types.cpp.tmp.exe-tag-types.obj C:\Work\llvm\tools\lldb\lit\SymbolFile\NativePDB\tag-types.cpp
  Env:
    TMP = C:\Users\ALEKSA~1.URA\AppData\Local\Temp
    SystemRoot = C:\WINDOWS
    SystemDrive = C:
    INCLUDE = C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\ATLMFC\include
              C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include
              C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt
              C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared
              C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um
              C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt
              C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt
    TEMP = C:\Users\ALEKSA~1.URA\AppData\Local\Temp
  STDOUT:

  STDERR:
    C:\Work\llvm\tools\lldb\lit\SymbolFile\NativePDB\tag-types.cpp(16,3) :  error: unknown type name 'char16_t'
      char16_t            C16;
      ^
    C:\Work\llvm\tools\lldb\lit\SymbolFile\NativePDB\tag-types.cpp(17,3) :  error: unknown type name 'char32_t'
      char32_t            C32;
      ^
    C:\Work\llvm\tools\lldb\lit\SymbolFile\NativePDB\tag-types.cpp(41,3) :  error: unknown type name 'char16_t'
      char16_t            *PC16;
      ^
    C:\Work\llvm\tools\lldb\lit\SymbolFile\NativePDB\tag-types.cpp(42,3) :  error: unknown type name 'char32_t'
      char32_t            *PC32;
      ^
    C:\Work\llvm\tools\lldb\lit\SymbolFile\NativePDB\tag-types.cpp(64,9) :  error: unknown type name 'char16_t'
      const char16_t            *PC16;
            ^
    C:\Work\llvm\tools\lldb\lit\SymbolFile\NativePDB\tag-types.cpp(65,9) :  error: unknown type name 'char32_t'
      const char32_t            *PC32;
            ^
    6 errors generated.
```
There is the file named `uchar.h` in the directory `C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt`, and it contains the typedefs for `char16_t` and `char32_t`, but I can't figure out, how the compiler could see it.

An interesting thing is that the compilation with the same command in the same console completes successfully:
```
C:\Work\llvm\build_x64\bin\clang-cl.exe -m64 /Od /GS- /GR- /Z7 -Xclang -fkeep-static-consts /c /FoC:\Work\llvm\build_x64\tools\lldb\lit\SymbolFile\NativePDB\Output\tag-types.cpp.tmp.exe-tag-types.obj C:\Work\llvm\tools\lldb\lit\SymbolFile\NativePDB\tag-types.cpp
```


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56904/new/

https://reviews.llvm.org/D56904





More information about the lldb-commits mailing list