This is an archive of the discontinued LLVM Phabricator instance.

fix cross compilation to 32 bit arm targets
ClosedPublic

Authored by vharron on Dec 30 2014, 5:31 PM.

Details

Summary

After syncing to ToT, I started getting this error when cross compiling to an arm target.

/usr/local/google/home/vharron/ll/cross/llvm/tools/lldb/include/lldb/Utility/ProcessStructReader.h:68:74: error: non-constant-expression cannot be narrowed from type 'unsigned long long' to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
                m_fields[const_name] = FieldImpl{field_type, byte_index, size};
                                                                         ^~~~

This patch adds a cast to fix the error. The cast is non-controversial because it comes after (size <= 8) is confirmed.

Diff Detail

Repository
rL LLVM

Event Timeline

vharron updated this revision to Diff 17680.Dec 30 2014, 5:31 PM
vharron retitled this revision from to fix cross compilation to 32 bit arm targets.
vharron updated this object.
vharron edited the test plan for this revision. (Show Details)
vharron added reviewers: zturner, granata.enrico.
vharron set the repository for this revision to rL LLVM.
vharron added a subscriber: Unknown Object (MLST).
vharron updated this revision to Diff 17740.Dec 30 2014, 9:18 PM
vharron updated this object.

Switched to static_cast

zturner accepted this revision.Jan 5 2015, 9:33 AM
zturner edited edge metadata.

lgtm

This revision is now accepted and ready to land.Jan 5 2015, 9:33 AM
vharron closed this revision.Jan 5 2015, 9:50 AM

Committed revision 225184.