@@ -236,7 +236,7 @@ class SPIRVEmitIntrinsics
236236
237237 Instruction *buildLogicalAccessChainFromGEP (GetElementPtrInst &GEP);
238238
239- bool promoteEmbddedBitcodeMarker (Module &M) const ;
239+ bool promoteEmbeddedBitcodeMarkear (Module &M) const ;
240240
241241public:
242242 static char ID;
@@ -3007,7 +3007,7 @@ void SPIRVEmitIntrinsics::parseFunDeclarations(Module &M) {
30073007 }
30083008}
30093009
3010- bool SPIRVEmitIntrinsics::promoteEmbddedBitcodeMarker (Module &M) const {
3010+ bool SPIRVEmitIntrinsics::promoteEmbeddedBitcodeMarkear (Module &M) const {
30113011 const SPIRVSubtarget *STI = TM->getSubtargetImpl ();
30123012 if (STI->isShader ())
30133013 return false ;
@@ -3016,18 +3016,18 @@ bool SPIRVEmitIntrinsics::promoteEmbddedBitcodeMarker(Module &M) const {
30163016 if (!EmbeddedBitcode)
30173017 return false ;
30183018
3019- ArrayType *AT = cast<ArrayType>(EmbeddedBitcode->getValueType ());
3020- if (AT ->getNumElements () != 0 )
3019+ ArrayType *ArrTy = cast<ArrayType>(EmbeddedBitcode->getValueType ());
3020+ if (ArrTy ->getNumElements () != 0 )
30213021 return false ;
30223022
30233023 // When compiling with -fembed-bitcode=marker, LLVM generates a [0 x i8]
30243024 // zeroinitialized global variable containing the bitcode. This results in an
30253025 // assert outside of shaders. As a workaround, we replace this global with a
30263026 // zeroinitialized [1 x i8].
3027- ArrayType *AT1 = ArrayType::get (AT ->getElementType (), 1 );
3028- Constant *ZeroInit = Constant::getNullValue (AT1 );
3027+ ArrayType *ArrTyOneElt = ArrayType::get (ArrTy ->getElementType (), 1 );
3028+ Constant *ZeroInit = Constant::getNullValue (ArrTyOneElt );
30293029 GlobalVariable *NewEmbeddedBitcode = new GlobalVariable (
3030- AT1 , EmbeddedBitcode->isConstant (), EmbeddedBitcode->getLinkage (),
3030+ ArrTyOneElt , EmbeddedBitcode->isConstant (), EmbeddedBitcode->getLinkage (),
30313031 ZeroInit, " " , EmbeddedBitcode->getThreadLocalMode (),
30323032 EmbeddedBitcode->getAddressSpace (),
30333033 EmbeddedBitcode->isExternallyInitialized ());
@@ -3043,7 +3043,7 @@ bool SPIRVEmitIntrinsics::promoteEmbddedBitcodeMarker(Module &M) const {
30433043bool SPIRVEmitIntrinsics::runOnModule (Module &M) {
30443044 bool Changed = false ;
30453045
3046- Changed |= promoteEmbddedBitcodeMarker (M);
3046+ Changed |= promoteEmbeddedBitcodeMarkear (M);
30473047 parseFunDeclarations (M);
30483048 insertConstantsForFPFastMathDefault (M);
30493049
0 commit comments