Skip to content

Commit 190a591

Browse files
committed
Fix issues
1 parent f1e5456 commit 190a591

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clang/include/clang/Interpreter/Value.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class REPL_EXTERNAL_VISIBILITY Value final {
201201
/// Represents a pointer. Holds the address and optionally a pointee `Value`.
202202
struct PtrValue {
203203
uint64_t Addr = 0;
204-
Value *Pointee; // optional for str
204+
Value *Pointee = nullptr; // optional for str
205205
PtrValue(uint64_t Addr) : Addr(Addr), Pointee(new Value()) {}
206206
~PtrValue() {
207207
if (Pointee != nullptr)
@@ -231,7 +231,7 @@ class REPL_EXTERNAL_VISIBILITY Value final {
231231

232232
public:
233233
Value() = default;
234-
explicit Value(QualType Ty, ValKind K) : Ty(Ty), VKind(K) {}
234+
explicit Value(QualType Ty) : Ty(Ty), VKind(K_None) {}
235235
Value(const Value &RHS);
236236
Value(Value &&RHS)
237237
: Ty(RHS.Ty), VKind(RHS.VKind), Data(RHS.Data),

clang/lib/Interpreter/Value.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ ValueReaderDispatcher::readBuiltin(QualType QT, llvm::orc::ExecutorAddr Addr) {
340340
if (Ty->isVoidType()) {
341341
LLVM_DEBUG(llvm::dbgs()
342342
<< "readBuiltin: void type, returning empty Value\n");
343-
return Value(Ty, Value::K_None);
343+
return Value(Ty);
344344
}
345345

346346
auto Size = Ctx.getTypeSizeInChars(Ty).getQuantity();

0 commit comments

Comments
 (0)