diff options
author | Yaxun Liu <Yaxun.Liu@amd.com> | 2019-01-30 12:26:54 +0000 |
---|---|---|
committer | Yaxun Liu <Yaxun.Liu@amd.com> | 2019-01-30 12:26:54 +0000 |
commit | 95f2ca541f2840ae78a1d5723e53505adb2b0197 (patch) | |
tree | 30e6c487550c02266305d835e87767d3f93b720b /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 34eeeec3ae343d6999d6556c2d1e6f73813e3163 (diff) | |
download | bcm5719-llvm-95f2ca541f2840ae78a1d5723e53505adb2b0197.tar.gz bcm5719-llvm-95f2ca541f2840ae78a1d5723e53505adb2b0197.zip |
[HIP] Fix size_t for MSVC environment
In 64 bit MSVC environment size_t is defined as unsigned long long.
In single source language like HIP, data layout should be consistent
in device and host compilation, therefore copy data layout controlling
fields from Aux target for AMDGPU target.
Differential Revision: https://reviews.llvm.org/D56318
llvm-svn: 352620
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 566edb083eb..d9e3226e11d 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -928,6 +928,9 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) { // Adjust target options based on codegen options. getTarget().adjustTargetOptions(getCodeGenOpts(), getTargetOpts()); + if (auto *Aux = getAuxTarget()) + getTarget().setAuxTarget(Aux); + // rewriter project will change target built-in bool type from its default. if (getFrontendOpts().ProgramAction == frontend::RewriteObjC) getTarget().noSignedCharForObjCBool(); |