File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -265,10 +265,10 @@ APValue Pointer::toAPValue(const ASTContext &ASTCtx) const {
265265}
266266
267267void Pointer::print (llvm::raw_ostream &OS) const {
268- OS << PointeeStorage. BS . Pointee << " ( " ;
269- if ( isBlockPointer ()) {
268+ switch (StorageKind) {
269+ case Storage::Block: {
270270 const Block *B = PointeeStorage.BS .Pointee ;
271- OS << " Block) {" ;
271+ OS << " ( Block) " << B << " {" ;
272272
273273 if (isRoot ())
274274 OS << " rootptr(" << PointeeStorage.BS .Base << " ), " ;
@@ -284,11 +284,18 @@ void Pointer::print(llvm::raw_ostream &OS) const {
284284 OS << B->getSize ();
285285 else
286286 OS << " nullptr" ;
287- } else {
288- OS << " Int) {" ;
289- OS << PointeeStorage.Int .Value << " , " << PointeeStorage.Int .Desc ;
287+ OS << " }" ;
288+ } break ;
289+ case Storage::Int:
290+ OS << " (Int) {" ;
291+ OS << PointeeStorage.Int .Value << " + " << Offset << " , "
292+ << PointeeStorage.Int .Desc ;
293+ OS << " }" ;
294+ break ;
295+ case Storage::Fn:
296+ OS << " (Fn) { " << asFunctionPointer ().getFunction () << " + " << Offset
297+ << " }" ;
290298 }
291- OS << " }" ;
292299}
293300
294301std::string Pointer::toDiagnosticString (const ASTContext &Ctx) const {
You can’t perform that action at this time.
0 commit comments