Skip to content

Commit 8d88049

Browse files
committed
Address comments
1 parent 85eafb4 commit 8d88049

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

clang/include/clang/Interpreter/Interpreter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ class Interpreter {
173173
private:
174174
size_t getEffectivePTUSize() const;
175175
void markUserCodeStart();
176-
llvm::Expected<Expr *> AttachValuePrinting(Expr *E);
176+
llvm::Expected<Expr *> ExtractValueFromExpr(Expr *E);
177177
llvm::Expected<llvm::orc::ExecutorAddr> CompileDtorCall(CXXRecordDecl *CXXRD);
178178

179179
CodeGenerator *getCodeGen() const;

clang/lib/Interpreter/Interpreter.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,14 +253,12 @@ class InProcessPrintingASTConsumer final : public MultiplexConsumer {
253253
bool HandleTopLevelDecl(DeclGroupRef DGR) override final {
254254
if (DGR.isNull())
255255
return true;
256-
// if (!Consumer)
257-
// return true;
258256

259257
for (Decl *D : DGR)
260258
if (auto *TLSD = llvm::dyn_cast<TopLevelStmtDecl>(D))
261259
if (TLSD && TLSD->isSemiMissing()) {
262260
auto ExprOrErr =
263-
Interp.AttachValuePrinting(cast<Expr>(TLSD->getStmt()));
261+
Interp.ExtractValueFromExpr(cast<Expr>(TLSD->getStmt()));
264262
if (llvm::Error E = ExprOrErr.takeError()) {
265263
llvm::logAllUnhandledErrors(std::move(E), llvm::errs(),
266264
"Value printing failed: ");

clang/lib/Interpreter/InterpreterValuePrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class InterfaceKindVisitor
156156
// // 3. If x is a struct, but a rvalue.
157157
// new (__clang_Interpreter_SetValueWithAlloc(ThisInterp, OpaqueValue,
158158
// xQualType)) (x);
159-
llvm::Expected<Expr *> Interpreter::AttachValuePrinting(Expr *E) {
159+
llvm::Expected<Expr *> Interpreter::ExtractValueFromExpr(Expr *E) {
160160
Sema &S = getCompilerInstance()->getSema();
161161
ASTContext &Ctx = S.getASTContext();
162162

0 commit comments

Comments
 (0)