]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/commit
Assigning and copying command line option objects shouldn't be allowed.
authorChris Bieneman <beanz@apple.com>
Thu, 22 Jan 2015 01:49:59 +0000 (01:49 +0000)
committerChris Bieneman <beanz@apple.com>
Thu, 22 Jan 2015 01:49:59 +0000 (01:49 +0000)
commite84c7b1116a08c3b93730da52ad1759eb4616d00
treeb3931fb054dc3b846555b8be898814a18c3f4ac2
parent48fcc07856a164793753c23776d06e9cdd9db96b
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
include/llvm/Support/CommandLine.h
tools/lli/lli.cpp
tools/llvm-profdata/llvm-profdata.cpp
tools/llvm-size/llvm-size.cpp