Skip to content

Commit c4c00cb

Browse files
committed
fix failing ci
1 parent 87ca1f6 commit c4c00cb

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

clang/include/clang/Interpreter/Interpreter.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class CXXRecordDecl;
4141
class Decl;
4242
class IncrementalExecutor;
4343
class IncrementalParser;
44+
class IncrementalCUDADeviceParser;
4445

4546
/// Create a pre-configured \c CompilerInstance for incremental processing.
4647
class IncrementalCompilerBuilder {
@@ -93,7 +94,7 @@ class Interpreter {
9394
std::unique_ptr<IncrementalExecutor> IncrExecutor;
9495

9596
// An optional parser for CUDA offloading
96-
std::unique_ptr<IncrementalParser> DeviceParser;
97+
std::unique_ptr<IncrementalCUDADeviceParser> DeviceParser;
9798

9899
// An optional action for CUDA offloading
99100
std::unique_ptr<IncrementalAction> DeviceAct;

clang/lib/Interpreter/Interpreter.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -574,20 +574,16 @@ Interpreter::Parse(llvm::StringRef Code) {
574574
// included in the host compilation
575575
if (DeviceParser) {
576576
llvm::Expected<TranslationUnitDecl *> DeviceTU = DeviceParser->Parse(Code);
577-
if (auto E = DeviceTU.takeError()) {
577+
if (auto E = DeviceTU.takeError())
578578
return std::move(E);
579-
}
580-
581-
auto *CudaParser =
582-
llvm::cast<IncrementalCUDADeviceParser>(DeviceParser.get());
583579

584580
RegisterPTU(*DeviceTU, nullptr, DeviceAct.get());
585581

586-
llvm::Expected<llvm::StringRef> PTX = CudaParser->GeneratePTX();
582+
llvm::Expected<llvm::StringRef> PTX = DeviceParser->GeneratePTX();
587583
if (!PTX)
588584
return PTX.takeError();
589585

590-
llvm::Error Err = CudaParser->GenerateFatbinary();
586+
llvm::Error Err = DeviceParser->GenerateFatbinary();
591587
if (Err)
592588
return std::move(Err);
593589
}

0 commit comments

Comments
 (0)