aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
diff options
context:
space:
mode:
authorOwen Pan <owenpiano@gmail.com>2022-01-24 08:44:54 -0800
committerOwen Pan <owenpiano@gmail.com>2022-01-24 09:05:27 -0800
commit7cd441ff537e00c743236658bfbcfc16c30ce031 (patch)
treef556d9c0e3f5f4e4919fd6ce1d139ed64a0c3682 /lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
parent6be77561f82d781cd957c316a7f53660510683a3 (diff)
downloadllvm-7cd441ff537e00c743236658bfbcfc16c30ce031.zip
llvm-7cd441ff537e00c743236658bfbcfc16c30ce031.tar.gz
llvm-7cd441ff537e00c743236658bfbcfc16c30ce031.tar.bz2
[clang][NFC] Wrap TYPE_SWITCH in "do while (0)" in the interpreter
Wraps the expansions of TYPE_SWITCH and COMPOSITE_TYPE_SWITCH in the constexpr interpreter with "do { ... } while (0)" so that these macros can be used like this: if (llvm::Optional<PrimType> T = Ctx.classify(FieldTy)) TYPE_SWITCH(*T, Ok &= ReturnValue<T>(FP.deref<T>(), Value)); else Ok &= Composite(FieldTy, FP, Value); This bug was found while testing D116316. See also review comment: https://reviews.llvm.org/D64146?id=208520#inline-584131 Also cleaned up the macro definitions by removing the superfluous do-while statements and removed the unused INT_TPYE_SWITCH macro. Differential Revision: https://reviews.llvm.org/D117301
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h')
0 files changed, 0 insertions, 0 deletions