OLD | NEW |
1 // Copyright 2011 Google Inc. All Rights Reserved. | 1 // Copyright 2011 Google Inc. All Rights Reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 12 matching lines...) Expand all Loading... |
23 switch (type) { | 23 switch (type) { |
24 case TYPE_ABSOLUTE: | 24 case TYPE_ABSOLUTE: |
25 case TYPE_RELATIVE: | 25 case TYPE_RELATIVE: |
26 case TYPE_PC_RELATIVE: { | 26 case TYPE_PC_RELATIVE: { |
27 // Ensure that no unknown flags are set. | 27 // Ensure that no unknown flags are set. |
28 return (flags & FLAG_UNKNOWN) == 0; | 28 return (flags & FLAG_UNKNOWN) == 0; |
29 } | 29 } |
30 | 30 |
31 case TYPE_OFFSET_32BIT: | 31 case TYPE_OFFSET_32BIT: |
32 case TYPE_OFFSET_8BIT: { | 32 case TYPE_OFFSET_8BIT: { |
33 // We've only ever seen offset fixups without flags. | 33 return (flags & ~FLAG_OFFSET_32BIT_VS2017) == 0; |
34 return flags == 0; | |
35 } | 34 } |
36 | 35 |
37 default: { | 36 default: { |
38 return false; | 37 return false; |
39 } | 38 } |
40 } | 39 } |
41 } | 40 } |
42 | 41 |
43 size_t PdbFixup::size() const { | 42 size_t PdbFixup::size() const { |
44 switch (type) { | 43 switch (type) { |
(...skipping 10 matching lines...) Expand all Loading... |
55 | 54 |
56 return 0; | 55 return 0; |
57 } | 56 } |
58 | 57 |
59 bool PdbFixup::is_offset() const { | 58 bool PdbFixup::is_offset() const { |
60 return type == TYPE_OFFSET_32BIT || | 59 return type == TYPE_OFFSET_32BIT || |
61 type == TYPE_OFFSET_8BIT; | 60 type == TYPE_OFFSET_8BIT; |
62 } | 61 } |
63 | 62 |
64 } // namespace pdb | 63 } // namespace pdb |
OLD | NEW |