forked from OSchip/llvm-project
[NVPTX] Fix crash with unnamed struct arguments
Patch by Eric Holk llvm-svn: 169418
This commit is contained in:
parent
90b0c84bcf
commit
fb711156ae
|
@ -957,7 +957,7 @@ bool llvm::isImageOrSamplerVal(const Value *arg, const Module *context) {
|
|||
return false;
|
||||
|
||||
const StructType *STy = dyn_cast<StructType>(PTy->getElementType());
|
||||
const std::string TypeName = STy ? STy->getName() : "";
|
||||
const std::string TypeName = STy && !STy->isLiteral() ? STy->getName() : "";
|
||||
|
||||
for (int i = 0, e = array_lengthof(specialTypes); i != e; ++i)
|
||||
if (TypeName == specialTypes[i])
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
; RUN: llc < %s -march=nvptx -mcpu=sm_13
|
||||
|
||||
define ptx_device void @test_function({i8, i8}*) {
|
||||
ret void
|
||||
}
|
Loading…
Reference in New Issue