Skip to content

[SYCL] Ambiguous reference to PointerType #21734

@0x12CC

Description

@0x12CC

Describe the bug

563401d adds a new definition for PointerType in llvm/include/llvm/SYCLLowerIR/MangleUtils.h that conflicts with the one in llvm/include/llvm/IR/InlineAsm.h. Although the two definitions are in different namespaces, the MangleUtils.cpp file has using directives for both namespaces.

There's no error when compiling with GCC or with pre-compiled headers disabled since MangleUtils.cpp does not include InlineAsm.h. The error only occurs when compiling with pre-compiled headers enabled since they include the conflicting definition.

To reproduce

Compile using Clang with pre-compiled headers enabled. Compilation should produce the following diagnostic:

llvm/lib/SYCLLowerIR/MangleUtils.cpp:100:6: error: reference to 'PointerType' is ambiguous

Environment

  • OS: Linux
  • Target device and vendor: NA
  • DPC++ version: 563401d
  • Dependencies version: NA

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions