================ @@ -267,92 +267,156 @@ std::string Interpreter::ValueDataToString(const Value &V) const { return "{ error: unknown builtin type '" + std::to_string(BT->getKind()) + " '}"; case clang::BuiltinType::Bool: - SS << ((V.getBool()) ? "true" : "false"); - return Str; - case clang::BuiltinType::Char_S: - SS << '\'' << V.getChar_S() << '\''; - return Str; - case clang::BuiltinType::SChar: - SS << '\'' << V.getSChar() << '\''; - return Str; - case clang::BuiltinType::Char_U: - SS << '\'' << V.getChar_U() << '\''; - return Str; - case clang::BuiltinType::UChar: - SS << '\'' << V.getUChar() << '\''; + SS << ((B.as<bool>()) ? "true" : "false"); return Str; case clang::BuiltinType::Short: - SS << V.getShort(); + SS << B.as<short>(); ---------------- vgvassilev wrote:
Why we have to cast the data when we know its type? If that's needed for out-of-process where the host and target architectures do not match, we should probably somehow do it in a separate facility because `getX` is much faster on matching architectures. https://github.com/llvm/llvm-project/pull/156649 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits