summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-03-14 11:14:43 +0000
committerPavel Labath <labath@google.com>2018-03-14 11:14:43 +0000
commit0dd81bab92f678ed16f80e4e0c2f55246b13c8b2 (patch)
treea40c1789f2ca569bbe5eb488df7eb3480cf52e60 /clang/lib/CodeGen/CodeGenFunction.cpp
parenta511dddced88ccf9e42b39de1d1538e864728640 (diff)
downloadbcm5719-llvm-0dd81bab92f678ed16f80e4e0c2f55246b13c8b2.tar.gz
bcm5719-llvm-0dd81bab92f678ed16f80e4e0c2f55246b13c8b2.zip
Explicitly initialize dwarf::FormParams in DIEInteger::SizeOf
This could end up inititialized if someone called the function with a null AsmPrinter. Right now this only happens in DIEHash unit tests, presumably because it was hard to create an AsmPrinter in the context of unit tests. This only worked before r327486 because those tests did not use any dwarf forms whose size actually depended on the dwarf version (otherwise, they would have crashed due to null dereference). I fix the uninitialized error, by explicitly initializing FormParams to an invalid value, which will cause getFixedFormByteSize to return None if called with a form with version-dependent size. A more principled solution might be to fix the DIEHash tests to always pass in a valid AsmPrinter. llvm-svn: 327498
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud