summaryrefslogtreecommitdiff
path: root/tools/llvm-size/llvm-size.cpp
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2015-01-22 01:49:59 +0000
committerChris Bieneman <beanz@apple.com>2015-01-22 01:49:59 +0000
commite84c7b1116a08c3b93730da52ad1759eb4616d00 (patch)
treeb3931fb054dc3b846555b8be898814a18c3f4ac2 /tools/llvm-size/llvm-size.cpp
parent48fcc07856a164793753c23776d06e9cdd9db96b (diff)
Assigning and copying command line option objects shouldn't be allowed.
Summary: The default copy and assignment operators for these objects probably don't actually do what the clients intend, so they should be deleted. Places using the assignment operator to set the value of an option should cast to the option's data type first to call into the override for operator=. Places using the copy constructor just need to be changed to not copy (i.e. passing by const reference instead of value). Reviewers: dexonsmith, chandlerc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7114 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-size/llvm-size.cpp')
-rw-r--r--tools/llvm-size/llvm-size.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/llvm-size/llvm-size.cpp b/tools/llvm-size/llvm-size.cpp
index fc211e3180b..0e0dd59ce92 100644
--- a/tools/llvm-size/llvm-size.cpp
+++ b/tools/llvm-size/llvm-size.cpp
@@ -709,7 +709,7 @@ int main(int argc, char **argv) {
ToolName = argv[0];
if (OutputFormatShort.getNumOccurrences())
- OutputFormat = OutputFormatShort;
+ OutputFormat = static_cast<OutputFormatTy>(OutputFormatShort);
if (RadixShort.getNumOccurrences())
Radix = RadixShort;