diff options
author | Mikael Nilsson <mikael.nilsson@arm.com> | 2018-12-12 15:06:16 +0000 |
---|---|---|
committer | Mikael Nilsson <mikael.nilsson@arm.com> | 2018-12-12 15:06:16 +0000 |
commit | 90646732bf1366f9df93fd41a58323cb8f8e0fce (patch) | |
tree | 4c48633a6081a378faf2e048c37fec998eecb3cf /clang/lib/CodeGen/CGClass.cpp | |
parent | c92fc3c8bca3c1f8ffdd3aa7606061927d64b940 (diff) | |
download | bcm5719-llvm-90646732bf1366f9df93fd41a58323cb8f8e0fce.tar.gz bcm5719-llvm-90646732bf1366f9df93fd41a58323cb8f8e0fce.zip |
Revert "[OpenCL] Add generic AS to 'this' pointer"
Reverting because the patch broke lldb.
llvm-svn: 348931
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGClass.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index cfc912cc9a0..28ae5559b2d 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/lib/CodeGen/CGClass.cpp @@ -16,7 +16,6 @@ #include "CGDebugInfo.h" #include "CGRecordLayout.h" #include "CodeGenFunction.h" -#include "TargetInfo.h" #include "clang/AST/CXXInheritance.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/EvaluatedExprVisitor.h" @@ -2013,19 +2012,8 @@ void CodeGenFunction::EmitCXXConstructorCall(const CXXConstructorDecl *D, bool NewPointerIsChecked) { CallArgList Args; - LangAS SlotAS = E->getType().getAddressSpace(); - QualType ThisType = D->getThisType(getContext()); - LangAS ThisAS = ThisType.getTypePtr()->getPointeeType().getAddressSpace(); - llvm::Value *ThisPtr = This.getPointer(); - if (SlotAS != ThisAS) { - unsigned TargetThisAS = getContext().getTargetAddressSpace(ThisAS); - llvm::Type *NewType = - ThisPtr->getType()->getPointerElementType()->getPointerTo(TargetThisAS); - ThisPtr = getTargetHooks().performAddrSpaceCast(*this, This.getPointer(), - ThisAS, SlotAS, NewType); - } // Push the this ptr. - Args.add(RValue::get(ThisPtr), D->getThisType(getContext())); + Args.add(RValue::get(This.getPointer()), D->getThisType(getContext())); // If this is a trivial constructor, emit a memcpy now before we lose // the alignment information on the argument. |