This is an archive of the discontinued LLVM Phabricator instance.

Set PIELevel module flag
ClosedPublic

Authored by tmsriram on Apr 28 2016, 1:59 PM.

Details

Reviewers
davidxl
rnk
Summary

In patch http://reviews.llvm.org/D19671, I added a patch to create PIELevel module flag. This patch sets the flag.

Diff Detail

Event Timeline

tmsriram updated this revision to Diff 55481.Apr 28 2016, 1:59 PM
tmsriram retitled this revision from to Set PIELevel module flag.
tmsriram updated this object.
tmsriram added reviewers: rnk, davidxl.
tmsriram added a subscriber: cfe-commits.
rnk accepted this revision.Apr 28 2016, 2:04 PM
rnk edited edge metadata.

lgtm

lib/CodeGen/CodeGenModule.cpp
492–498

This seems simpler as:

assert(PLevel < 3 && "invalid PIE level");
getModule().setPIELevel(static_cast<llvm::PIELevel::Level>(PLevel));
This revision is now accepted and ready to land.Apr 28 2016, 2:04 PM
tmsriram updated this revision to Diff 55493.Apr 28 2016, 2:41 PM
tmsriram edited edge metadata.

Simplify code setting PICLevel and PIELevel module flags.

rnk added a comment.Apr 28 2016, 3:03 PM

still lgtm

lib/CodeGen/CodeGenModule.cpp
486

formatting nit: no space between 'assert' and '('