This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Fix "requires global constructor" warning in g_range_specifiers
AcceptedPublic

Authored by kubamracek on Mar 2 2018, 4:37 PM.

Diff Detail

Event Timeline

kubamracek created this revision.Mar 2 2018, 4:37 PM
labath added a subscriber: labath.Mar 2 2018, 4:42 PM
labath added inline comments.
source/Breakpoint/BreakpointID.cpp
49

You can probably make this static constexpr llvm::StringLiteral and avoid constructors altogether..

davide accepted this revision.Mar 3 2018, 11:12 AM

LGTM with Pavel's suggestion implemented.

This revision is now accepted and ready to land.Mar 3 2018, 11:12 AM
labath added a comment.Mar 3 2018, 1:16 PM

BTW, to appease older versions of gcc you will need to write the initializer as = {{"-"}, {"to"}, ...} (i.e. add extra {} around the strings).